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

add `yq` for year-quarter parsing #422

Closed
vspinu opened this Issue Jun 16, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@vspinu
Member

vspinu commented Jun 16, 2016

No description provided.

@hansthompson

This comment has been minimized.

Show comment
Hide comment
@hansthompson

hansthompson Aug 3, 2016

Would this be a way having a posix-like object output from quarter()?

hansthompson commented Aug 3, 2016

Would this be a way having a posix-like object output from quarter()?

@vspinu

This comment has been minimized.

Show comment
Hide comment
@vspinu

vspinu Aug 3, 2016

Member

What do you have in mind more concretely? You don't have to use quarter to get time-stamps. You can use floor_date(..., unit = "quarter").

For parsing I indeed had in mind returning a Date object from strings like "2016.4".

Member

vspinu commented Aug 3, 2016

What do you have in mind more concretely? You don't have to use quarter to get time-stamps. You can use floor_date(..., unit = "quarter").

For parsing I indeed had in mind returning a Date object from strings like "2016.4".

@vspinu vspinu closed this in f2f73a3 Aug 3, 2016

vspinu added a commit that referenced this issue Aug 3, 2016

@hansthompson

This comment has been minimized.

Show comment
Hide comment
@hansthompson

hansthompson Aug 4, 2016

Yes. I was hoping this would be something that takes a string like "2016.4" and gives it a date object.

hansthompson commented Aug 4, 2016

Yes. I was hoping this would be something that takes a string like "2016.4" and gives it a date object.

@vspinu

This comment has been minimized.

Show comment
Hide comment
@vspinu

vspinu Aug 4, 2016

Member

It has been done

> yq("2014.1")
[1] "2014-01-01"

You also have a new format q that you can pass to parse_date_time and friends.

Member

vspinu commented Aug 4, 2016

It has been done

> yq("2014.1")
[1] "2014-01-01"

You also have a new format q that you can pass to parse_date_time and friends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment