date_time: nth friday of month
Hello, Is there an object that encodes "second friday of month", rather than "second friday of april"? Then you would pass to it month + year to get a date? If not, how would I implement such a type? Extend nth_day_of_the_week_in_month? Thanks,
Is anyone familiar with date_time internals who could help here?
Rds,
On 24 May 2014 02:07, MM
Hello,
Is there an object that encodes "second friday of month", rather than "second friday of april"? Then you would pass to it month + year to get a date? If not, how would I implement such a type? Extend nth_day_of_the_week_in_month?
Thanks,
Won’t the date generator functions allow you to do this? It has been a long time since I looked at these but I seem to recall functions that would allow the implementation of the function you want. Take a look at the documentation.
Larry
From: MM
Sent: Friday, May 30, 2014 11:07 AM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] date_time: nth friday of month
Is anyone familiar with date_time internals who could help here?
Rds,
On 24 May 2014 02:07, MM
On 30 May 2014 17:11, Larry
Won’t the date generator functions allow you to do this? It has been a long time since I looked at these but I seem to recall functions that would allow the implementation of the function you want. Take a look at the documentation.
Larry
Indeed the existing one allows you to store "second friday of april" in a object, then call get_date( year ) on that object to get an actual date. Now i need to store "second friday of any month" in some object, then pass get_date( year, month ) to get the actual date. This is not available. I was asking if someone knew how to implement such a class. MM
participants (2)
-
Larry
-
MM