Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature proposal: Reads creation/modified time of SAS7BDAT #732

Open
SInginc opened this issue Aug 25, 2023 · 3 comments
Open

New feature proposal: Reads creation/modified time of SAS7BDAT #732

SInginc opened this issue Aug 25, 2023 · 3 comments
Labels
feature a feature request or enhancement

Comments

@SInginc
Copy link

SInginc commented Aug 25, 2023

Thank you for making this awsome package!

While using haven to read SAS7BDAT file, I found that haven will not read the creation/modified time of the file. The rationale of getting these two timestamps is that these two timestamps stored in the metadata of a SAS7BDAT file are different from the timestamps read the OS.

And in ReadStat, there are already two functions, readstat_get_creation_time and readstat_get_modified_time, which can be used to read the creation/modified time. But they are not exposed in haven yet.

My proposal is that maybe we can add these two timestamps to the attribute of the output.

I forked haven and have made a commit to add creation/modified time to the output's attribute here for you kind review. I compared the creation/modified time read by readstat_get_creation_time and readstat_get_modified_time and the creation/modified time obtained by PROC CONTENT from my end. The result shows that they are identical.

If you find my implementation workable, I can make a pull request to haven.

Thank you!
Jack

@gorcha
Copy link
Member

gorcha commented Aug 28, 2023

Thanks @SInginc!

I've had a quick look and it's looking good on a first glance, more than happy for you to open a PR for review 🙂

@SInginc
Copy link
Author

SInginc commented Sep 20, 2023

Thanks @SInginc!

I've had a quick look and it's looking good on a first glance, more than happy for you to open a PR for review 🙂

Hi @gorcha,

I have made a PR to haven for this new feature. In the PR, I also included changes in the tests just to pass the tests with the new feature. Further discussion on how to test the new feature might be needed.

Many thanks!

@gorcha
Copy link
Member

gorcha commented Sep 20, 2023

Thanks @SInginc, much appreciated!

I'll check it out over the next couple of days and get back to you with some feedback 🙂

@hadley hadley added the feature a feature request or enhancement label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants