diff options
author | Niclas Axelsson <[email protected]> | 2011-03-02 16:44:43 +0100 |
---|---|---|
committer | Niclas Axelsson <[email protected]> | 2011-03-02 16:44:49 +0100 |
commit | c7d5c7105cd5161fa2cb7c4358ea6097946fede7 (patch) | |
tree | 3edd3b534f34e476a3a08b8f9f49fd0b14684d79 /lib/stdlib/doc/src/calendar.xml | |
parent | bbed1363f171199b3d87145d8a5e2c1875ca90ca (diff) | |
parent | 7c94e6f3a69462968cfd352fb40389454bd42e7e (diff) | |
download | otp-c7d5c7105cd5161fa2cb7c4358ea6097946fede7.tar.gz otp-c7d5c7105cd5161fa2cb7c4358ea6097946fede7.tar.bz2 otp-c7d5c7105cd5161fa2cb7c4358ea6097946fede7.zip |
Merge branch 'ih/calendar-iso-8601-erl' into dev
* ih/calendar-iso-8601-erl:
Add ISO week number calculation functions to the calendar module in stdlib
OTP-9087
Diffstat (limited to 'lib/stdlib/doc/src/calendar.xml')
-rw-r--r-- | lib/stdlib/doc/src/calendar.xml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/stdlib/doc/src/calendar.xml b/lib/stdlib/doc/src/calendar.xml index 36f0c03162..f90d8308b6 100644 --- a/lib/stdlib/doc/src/calendar.xml +++ b/lib/stdlib/doc/src/calendar.xml @@ -63,6 +63,14 @@ given as local time, they must be converted to universal time, in order to get the correct value of the elapsed time between epochs. Use of the function <c>time_difference/2</c> is discouraged.</p> + <p>There exists different definitions for the week of the year. + The calendar module contains a week of the year implementation + which conforms to the ISO 8601 standard. Since the week number for + a given date can fall on the previous, the current or on the next + year it is important to provide the information which year is it + together with the week number. The function <c>iso_week_number/0</c> + and <c>iso_week_number/1</c> returns a tuple of the year and the + week number.</p> </description> <section> @@ -154,6 +162,30 @@ time() = {Hour, Minute, Second} </desc> </func> <func> + <name>iso_week_number() -> IsoWeekNumber</name> + <fsummary>Compute the iso week number for the actual date</fsummary> + <type> + <v>IsoWeekNumber = {int(), int()}</v> + </type> + <desc> + <p>This function returns the tuple {Year, WeekNum} representing + the iso week number for the actual date. For determining the + actual date, the function <c>local_time/0</c> is used.</p> + </desc> + </func> + <func> + <name>iso_week_number(Date) -> IsoWeekNumber</name> + <fsummary>Compute the iso week number for the given date</fsummary> + <type> + <v>Date = date()</v> + <v>IsoWeekNumber = {int(), int()}</v> + </type> + <desc> + <p>This function returns the tuple {Year, WeekNum} representing + the iso week number for the given date.</p> + </desc> + </func> + <func> <name>last_day_of_the_month(Year, Month) -> int()</name> <fsummary>Compute the number of days in a month</fsummary> <desc> |