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
last day of the month #26
Comments
There's currently no way of interpreting |
How about last day of a month is first day of the next month minus one day? In other words, use the month day lookup that's built into ruby / the OS. |
That is what I ended up doing for that particular case instead of usng Chronic. |
@jeremywadsack Yeah that was my intention for this. Just haven't found time to get around to it yet. |
It would also be great to have "Last Monday in May" logic (this is US Memorial Day). |
+1 for d = ((x = Chronic::parse("fifth Monday in May")).nil?) ? (Chronic::parse("fourth Monday in May)) : x |
+1 for last weekday of month |
+1 last day of the month |
2 similar comments
+1 last day of the month |
+1 last day of the month |
+1 |
Here is how I did it based on @jeremywadsack's comment: Chronic.parse('1st day next month') - 1.day |
This is a much needed feature... any ETA? My use case: "Last day of next month" Expected: If today is 14 Feb 2019 -> 31 March 2019 |
I am trying to find a way of getting the last day of a month, for example: last day of last month
I have tried various combos but cannot find anything. I have had a look through the code and it is a bit beyond me. Does anyone know if this can be done?
I should mention that the first day works. Something like "last month first day" or "first day of last month" is fine.
The text was updated successfully, but these errors were encountered: