21#ifndef __ANTARES_LIBS_DATE_DATE_H__
22#define __ANTARES_LIBS_DATE_DATE_H__
27#include <yuni/core/string.h>
29#include "antares/study/fwd.h"
64namespace Antares::Date
69const char* MonthToString(
int m,
int offset = 0);
75const char* MonthToLowerString(
int m,
int offset = 0);
80const char* MonthToShortString(
int m,
int offset = 0);
85const char* MonthToUpperShortString(
int m,
int offset = 0);
90bool StringToMonth(MonthName& out, AnyString text);
95const char* WeekdayToString(
int m);
100const char* WeekdayToShortString(
int m);
105const char* WeekdayToShortUpperString(
int m);
110const char* WeekdayToShortLowerString(
int m);
115const wchar_t* WeekdayToLShortString(
int m);
124bool StringToDayOfTheWeek(DayOfTheWeek& v,
const AnyString& text);
132const char* DayOfTheWeekToString(DayOfTheWeek d);
170 uint numberOfWeeks()
const;
bool firstHourInMonth
First hour in the current month.
Definition date.h:218
struct Antares::Date::Calendar::@17 text
Human string representations for any time interval of our calendar.
ShortString12 weekdays[7]
Weekdays.
Definition date.h:320
uint dayYear
The day year for a single hour in the year.
Definition date.h:206
struct Antares::Date::Calendar::@14 weeks[maxWeeksInYear]
Informations about weeks according the current calendar settings.
uint userweek
User week number.
Definition date.h:254
@ maxDaysInYear
The maximum number of days in a year.
Definition date.h:194
@ maxHoursInYear
The maximum number of hours in a year.
Definition date.h:192
@ maxWeeksInYear
The maximum number of weeks in a year.
Definition date.h:196
~Calendar()
Destructor.
Definition date.h:337
uint month
Month.
Definition date.h:212
DayInterval daysYear
Days in the year.
Definition date.h:247
uint dayHour
Hour in the day.
Definition date.h:210
uint days
Total number of days of simulation for this week.
Definition date.h:249
struct Antares::Date::Calendar::@16 mapping
Mappings between any expected calendar and our own calendar.
struct Antares::Date::Calendar::@12 hours[maxHoursInYear]
informations about hours in the year according the current
struct Antares::Date::Calendar::@13 days[maxDaysInYear]
Informations about days in the year according the current.
bool firstHourInDay
First hour in the current day.
Definition date.h:216
ShortString8 shortUpperName
Short name (3 letters) and uppercase (JAN..DEC)
Definition date.h:312
ShortString8 shortName
Short name (3 letters) and uppercase (Jan..Dec)
Definition date.h:310
HourInterval hours
Hour interval.
Definition date.h:228
uint dayMonth
The day in the month.
Definition date.h:208
struct Antares::Date::Calendar::@15 months[12+1]
Informations about months according the current calendar settings.
uint week
Week.
Definition date.h:214
MonthName realmonth
Real month index.
Definition date.h:276
bool saveToCSVFile(const AnyString &filename) const
Export the whole calendar into a CSV file.
Yuni::CString< 7, false > ShortString8
Short string representation with maximum 8 characters.
Definition date.h:187
void reset()
Reset the calendar from the given settings.
Definition date.cpp:383
ShortString12 name
Month name (January..December)
Definition date.h:308
Calendar()
Default constructor.
Definition date.cpp:363
Yuni::CString< 11, false > ShortString12
Short string representation with maximum 12 characters.
Definition date.h:185
DayOfTheWeek firstWeekday
Very First weekday of the month.
Definition date.h:274
DayOfTheWeek weekday
Weekday.
Definition date.h:204
Yuni::CString< 41, false > ShortString42
Short string representation with maximum 42 characters.
Definition date.h:183
Command line settings for launching the simulation.
Definition options.h:37
The calendar settings.
Definition date.h:290
DayOfTheWeek weekday1rstJanuary
Day of the week for the 1rst January.
Definition date.h:292
bool leapYear
Leap year ?
Definition date.h:298
DayOfTheWeek weekFirstDay
First day of weeks (for Antares simulations)
Definition date.h:294
MonthName firstMonth
Index (0..11) of the first month of the year.
Definition date.h:296
uint first
The very first day.
Definition date.h:166
uint end
The last day (not included)
Definition date.h:168
uint first
The very first hour.
Definition date.h:152
uint end
The last hour (not included)
Definition date.h:154