Skip to content

Commit

Permalink
chrono Month aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvdb committed Mar 29, 2024
1 parent 936b81f commit 84db1a7
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions include/infra/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ using local_seconds = std::chrono::local_seconds;
using local_date_point = std::chrono::local_days;
using local_time_point = std::chrono::local_time<std::chrono::milliseconds>;
using choose = std::chrono::choose;

auto January = std::chrono::January;
auto February = std::chrono::February;
auto March = std::chrono::March;
auto April = std::chrono::April;
auto May = std::chrono::May;
auto June = std::chrono::June;
auto July = std::chrono::July;
auto August = std::chrono::August;
auto September = std::chrono::September;
auto October = std::chrono::October;
auto November = std::chrono::November;
auto December = std::chrono::December;

#else
using days = date::days;
using month = date::month;
Expand All @@ -48,6 +62,19 @@ using local_seconds = date::local_seconds;
using local_date_point = date::local_days;
using local_time_point = date::local_time<std::chrono::milliseconds>;
using choose = date::choose;

auto January = date::January;
auto February = date::February;
auto March = date::March;
auto April = date::April;
auto May = date::May;
auto June = date::June;
auto July = date::July;
auto August = date::August;
auto September = date::September;
auto October = date::October;
auto November = date::November;
auto December = date::December;
#endif

date_point today();
Expand Down

0 comments on commit 84db1a7

Please sign in to comment.