OSDN Git Service

2010-04-06 Matthias Klose <doko@ubuntu.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / g-calend.ads
index 8bb2e6e..39ca203 100644 (file)
@@ -70,18 +70,9 @@ package GNAT.Calendar is
    --  Return the day name
 
    function Day_In_Year (Date : Ada.Calendar.Time) return Day_In_Year_Number;
-   --  Returns the day number in the year. (1st January is day 1 and 31st
+   --  Return the day number in the year. (1st January is day 1 and 31st
    --  December is day 365 or 366 for leap year).
 
-   function Week_In_Year (Date : Ada.Calendar.Time) return Week_In_Year_Number;
-   --  Returns the week number as defined in ISO 8601. A week always starts on
-   --  a Monday and the first week of a particular year is the one containing
-   --  the first Thursday. A year may have 53 weeks when January 1st is a
-   --  Wednesday and the year is leap or January 1st is a Thursday. Note that
-   --  the last days of December may belong to the first week on the next year
-   --  and conversely, the first days of January may belong to the last week
-   --  of the last year.
-
    procedure Split
      (Date       : Ada.Calendar.Time;
       Year       : out Ada.Calendar.Year_Number;
@@ -102,7 +93,23 @@ package GNAT.Calendar is
       Minute     : Minute_Number;
       Second     : Second_Number;
       Sub_Second : Second_Duration := 0.0) return Ada.Calendar.Time;
-   --  Returns an Ada.Calendar.Time data built from the date and time values
+   --  Return an Ada.Calendar.Time data built from the date and time values
+
+   function Week_In_Year (Date : Ada.Calendar.Time) return Week_In_Year_Number;
+   --  Return the week number as defined in ISO 8601. A week always starts on
+   --  a Monday and the first week of a particular year is the one containing
+   --  the first Thursday. A year may have 53 weeks when January 1st is a
+   --  Wednesday and the year is leap or January 1st is a Thursday. Note that
+   --  the last days of December may belong to the first week on the next year
+   --  and conversely, the first days of January may belong to the last week
+   --  of the last year.
+
+   procedure Year_Week_In_Year
+     (Date : Ada.Calendar.Time;
+      Year : out Ada.Calendar.Year_Number;
+      Week : out Week_In_Year_Number);
+   --  Return the week number as defined in ISO 8601 along with the year in
+   --  which the week occurs.
 
    --  C timeval conversion