-
Notifications
You must be signed in to change notification settings - Fork 0
calendar.h ~ calendar ~ week_of_month_type
Baptiste Thémine edited this page Jul 9, 2020
·
6 revisions
namespace calendar::week_of_month { typedef /* implementation defined */ week_of_month_type; }
Defines integer type to store the representation of weeks in a month.
An ISO 8601 valid week_of_month_type
must have a value between 1 and 5, in which case it can be safely handled as a mweek
parameter such as in datetime_type structure, otherwise the program is ill-formed.
Name | Description |
---|---|
operator>> operator<< |
I/O stream operators for calendar types. |
In the following example, we display today's week of month.
#include <iostream>
#include <JLC/JLC.h>
using namespace JLC;
using namespace calendar::week_of_month;
int main(){
const Date today = Date::now();
const week_of_month_type mweek = today.week_of_month();
std::cout << today << std::endl;
std::cout << mweek << std::endl;
}
2020-03-27T11:29:19+0000
4