diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-05-15 11:44:53 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-05-15 11:44:53 +0200 |
commit | 5277d0b7109e67d3dd582f5b832723ed8e008cb1 (patch) | |
tree | e07c7f61f1320e6afd3773609fb222507665b4f3 /gcc/ada/g-calend.ads | |
parent | e4f422b8afeaed39fbc0ad5f6735739489f57d10 (diff) | |
download | gcc-5277d0b7109e67d3dd582f5b832723ed8e008cb1.zip gcc-5277d0b7109e67d3dd582f5b832723ed8e008cb1.tar.gz gcc-5277d0b7109e67d3dd582f5b832723ed8e008cb1.tar.bz2 |
[multiple changes]
2012-05-15 Hristian Kirtchev <kirtchev@adacore.com>
* g-calend.adb (Split_At_Locale): New routine.
(Time_Of_At_Locale): New routine.
* g-calend.ads (Split_At_Locale): New routine.
(Time_Of_At_Locale): New routine.
2012-05-15 Gary Dismukes <dismukes@adacore.com>
* a-except.ads: Minor reformatting.
2012-05-15 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the loop
parameter specification is part of a quantified expression, and it
already carries a type, do not repeat the analysis to preserve
type information: a range attribute reference may have been
rewritten as a range with static bounds, and its re-analysis may
type it as Integer by default, instead of the original index type.
2012-05-15 Robert Dewar <dewar@adacore.com>
* s-osprim-mingw.adb: Minor reformatting.
From-SVN: r187512
Diffstat (limited to 'gcc/ada/g-calend.ads')
-rw-r--r-- | gcc/ada/g-calend.ads | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/gcc/ada/g-calend.ads b/gcc/ada/g-calend.ads index 9dd5ae0..b1c5a40 100644 --- a/gcc/ada/g-calend.ads +++ b/gcc/ada/g-calend.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2012, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -83,8 +83,25 @@ package GNAT.Calendar is Minute : out Minute_Number; Second : out Second_Number; Sub_Second : out Second_Duration); - -- Split the standard Ada.Calendar.Time data in date data (Year, Month, - -- Day) and Time data (Hour, Minute, Second, Sub_Second) + -- Split a standard Ada.Calendar.Time value in date data (Year, Month, Day) + -- and Time data (Hour, Minute, Second, Sub_Second). + + procedure Split_At_Locale + (Date : Ada.Calendar.Time; + Year : out Ada.Calendar.Year_Number; + Month : out Ada.Calendar.Month_Number; + Day : out Ada.Calendar.Day_Number; + Hour : out Hour_Number; + Minute : out Minute_Number; + Second : out Second_Number; + Sub_Second : out Second_Duration); + -- Split a standard Ada.Calendar.Time value in date data (Year, Month, Day) + -- and Time data (Hour, Minute, Second, Sub_Second). This version of Split + -- utilizes the time zone and DST bias of the locale (equivalent to Clock). + -- Due to this simplified behavior, the implementation does not require + -- expensive system calls on targets such as Windows. + -- WARNING: Split_At_Locale is no longer aware of historic events and may + -- produce inaccurate results over DST changes which occurred in the past. function Time_Of (Year : Ada.Calendar.Year_Number; @@ -96,6 +113,22 @@ package GNAT.Calendar is Sub_Second : Second_Duration := 0.0) return Ada.Calendar.Time; -- Return an Ada.Calendar.Time data built from the date and time values + function Time_Of_At_Locale + (Year : Ada.Calendar.Year_Number; + Month : Ada.Calendar.Month_Number; + Day : Ada.Calendar.Day_Number; + Hour : Hour_Number; + Minute : Minute_Number; + Second : Second_Number; + Sub_Second : Second_Duration := 0.0) return Ada.Calendar.Time; + -- Return an Ada.Calendar.Time data built from the date and time values. + -- This version of Time_Of utilizes the time zone and DST bias of the + -- locale (equivalent to Clock). Due to this simplified behavior, the + -- implementation does not require expensive system calls on targets such + -- as Windows. + -- WARNING: Split_At_Locale is no longer aware of historic events and may + -- produce inaccurate results over DST changes which occurred in the past. + 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 |