-
Notifications
You must be signed in to change notification settings - Fork 0
calendar.h ~ calendar ~ day_of_year_type
Baptiste Thémine edited this page Jul 9, 2020
·
6 revisions
namespace calendar::day_of_year { typedef /* implementation defined */ day_of_year_type; }
Defines integer type to store the representation of days in a year.
An ISO 8601 valid day_of_year_type
must have a value between 1 and 366, in which case it can be safely handled as a yday
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 day of year.
#include <iostream>
#include <JLC/JLC.h>
using namespace JLC;
using namespace calendar::day_of_year;
int main(){
const Date today = Date::now();
const day_of_year_type yday = today.day_of_year();
std::cout << today << std::endl;
std::cout << yday << std::endl;
}
2020-03-27T11:29:19+0000
87