aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/calendar.erl
AgeCommit message (Collapse)Author
2019-02-20stdlib: Optimize calendar:system_time_to_rfc3339()Hans Bolinder
Not using io_lib for formatting makes the conversion several times faster.
2019-01-31Optimize calendar:gregorian_days_to_date/1Stanislav Mayorov
This patch improves the performance of calendar:gregorian_days_to_date/1 by changing the algorithm for finding the year to log-logarithmic. The old implementation has linear complexity, which makes function too slow for large values. For example: There is an API that allows you to create events for future dates. There are users of this API who, for some reasons, choose dates very far in the future. In such conditions, function works very slow. New implementation based on interpolation search, takes 1 or 2 iterations at most cases and free from such a flaw. A unit test was also developed to illustrate the speed of a function at large values.
2018-11-29stdlib: Let calendar:system_time_to_rfc3339() keep fractionsHans Bolinder
RFC3339 mentions in paragraph 5.1 that if certain conditions are fulfilled, then sorting date and time strings results in a time-ordered sequence. One of the conditions is that the strings must have the same number of fractional second digits. This commits makes sure this is indeed the case.
2018-04-26stdlib: Add RFC 3339 functions to module calendarHans Bolinder
Functions for converting between RFC 3339 strings and system time are added. Options are lists, but we are considering using maps instead. If we change, it will happen after Erlang/OTP 21.0-rc1 is released.
2018-04-21stdlib: Add system time functions to module calendarHans Bolinder
2016-03-15update copyright-yearHenrik Nord
2015-06-18Change license text to APLv2Bruce Yinhe
2015-03-20Replace usage of erlang:now() with usage of new APIRickard Green
2011-06-20Add more specs and typesHans Bolinder
An incorrect spec, rpc:yield/1, has been fixed.
2011-05-12Types and specifications have been modified and addedHans Bolinder
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-03-02Add ISO week number calculation functions to the calendar module in stdlibImre Horvath
This new feature adds the missing week number function to the calendar module of the stdlib application. The implementation conforms to the ISO 8601 standard. The new feature has been implemented tested and documented.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP