From c5377779548f706c7c82be38fdd9b16551100c38 Mon Sep 17 00:00:00 2001 From: Filipe David Manana Date: Mon, 13 Dec 2010 15:12:28 +0000 Subject: Fixes to the dict module documentation Fixed grammar and one inconsistency (Key - Value instead of key/value, since everywhere else the former is used). --- lib/stdlib/doc/src/dict.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/stdlib/doc/src') diff --git a/lib/stdlib/doc/src/dict.xml b/lib/stdlib/doc/src/dict.xml index ebcd2eed09..1695e9d14f 100644 --- a/lib/stdlib/doc/src/dict.xml +++ b/lib/stdlib/doc/src/dict.xml @@ -165,8 +165,8 @@ dictionary() Dict = dictionary() -

This function converts the key/value list List to a - dictionary.

+

This function converts the Key - Value list + List to a dictionary.

@@ -270,7 +270,7 @@ merge(Fun, D1, D2) -> Dict1 = Dict2 = dictionary() -

Update the a value in a dictionary by calling Fun on +

Update a value in a dictionary by calling Fun on the value to get a new value. An exception is generated if Key is not present in the dictionary.

@@ -285,7 +285,7 @@ merge(Fun, D1, D2) -> Dict1 = Dict2 = dictionary() -

Update the a value in a dictionary by calling Fun on +

Update a value in a dictionary by calling Fun on the value to get a new value. If Key is not present in the dictionary then Initial will be stored as the first value. For example append/3 could be defined -- cgit v1.2.3 From 18777e8f34979c4bc66ccd6930ed095a7a88891a Mon Sep 17 00:00:00 2001 From: Filipe David Manana Date: Mon, 13 Dec 2010 18:05:44 +0000 Subject: Fixes to the orddict module documentation Fixed grammar and one inconsistency (Key - Value instead of key/value, since everywhere else the former is used). --- lib/stdlib/doc/src/orddict.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/stdlib/doc/src') diff --git a/lib/stdlib/doc/src/orddict.xml b/lib/stdlib/doc/src/orddict.xml index 08c808f822..9d036f0725 100644 --- a/lib/stdlib/doc/src/orddict.xml +++ b/lib/stdlib/doc/src/orddict.xml @@ -172,8 +172,8 @@ ordered_dictionary() Orddict = ordered_dictionary() -

This function converts the key/value list List to a - dictionary.

+

This function converts the Key - Value list + List to a dictionary.

@@ -277,7 +277,7 @@ merge(Fun, D1, D2) -> Orddict1 = Orddict2 = ordered_dictionary() -

Update the a value in a dictionary by calling Fun on +

Update a value in a dictionary by calling Fun on the value to get a new value. An exception is generated if Key is not present in the dictionary.

@@ -292,7 +292,7 @@ merge(Fun, D1, D2) -> Orddict1 = Orddict2 = ordered_dictionary() -

Update the a value in a dictionary by calling Fun on +

Update a value in a dictionary by calling Fun on the value to get a new value. If Key is not present in the dictionary then Initial will be stored as the first value. For example append/3 could be defined -- cgit v1.2.3 From 7c94e6f3a69462968cfd352fb40389454bd42e7e Mon Sep 17 00:00:00 2001 From: Imre Horvath Date: Tue, 14 Dec 2010 23:03:44 +0100 Subject: Add ISO week number calculation functions to the calendar module in stdlib 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. --- lib/stdlib/doc/src/calendar.xml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'lib/stdlib/doc/src') 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 time_difference/2 is discouraged.

+

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 iso_week_number/0 + and iso_week_number/1 returns a tuple of the year and the + week number.

@@ -153,6 +161,30 @@ time() = {Hour, Minute, Second}

This function checks if a year is a leap year.

+ + iso_week_number() -> IsoWeekNumber + Compute the iso week number for the actual date + + IsoWeekNumber = {int(), int()} + + +

This function returns the tuple {Year, WeekNum} representing + the iso week number for the actual date. For determining the + actual date, the function local_time/0 is used.

+
+
+ + iso_week_number(Date) -> IsoWeekNumber + Compute the iso week number for the given date + + Date = date() + IsoWeekNumber = {int(), int()} + + +

This function returns the tuple {Year, WeekNum} representing + the iso week number for the given date.

+
+
last_day_of_the_month(Year, Month) -> int() Compute the number of days in a month -- cgit v1.2.3