summaryrefslogtreecommitdiff
path: root/gcc/ada/g-catiio.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-13 10:27:07 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-13 10:27:07 +0000
commit2fdb9822d2e78c1e9f921d5817e45ca57c143b53 (patch)
tree59b00f6ec5dd4e255a6400d076e3b74290c96d52 /gcc/ada/g-catiio.ads
parent87027bccd47eaa00b241cb14371aa786336b4625 (diff)
downloadgcc-2fdb9822d2e78c1e9f921d5817e45ca57c143b53.tar.gz
2007-12-06 Emmanuel Briot <briot@adacore.com>
* g-calend.ads (No_Time): New constant, to represent an uninitialized time value * g-catiio.ads, g-catiio.adb (Value): Added support for more date formats. (Month_Name_To_Number): New subprogram * g-dirope.adb (Get_Current_Dir): On windows, normalize the drive letter to upper-case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130839 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-catiio.ads')
-rw-r--r--gcc/ada/g-catiio.ads23
1 files changed, 17 insertions, 6 deletions
diff --git a/gcc/ada/g-catiio.ads b/gcc/ada/g-catiio.ads
index 48abe6a14d4..5c2cbf9834f 100644
--- a/gcc/ada/g-catiio.ads
+++ b/gcc/ada/g-catiio.ads
@@ -118,15 +118,26 @@ package GNAT.Calendar.Time_IO is
function Value (Date : String) return Ada.Calendar.Time;
-- Parse the string Date and return its equivalent as a Time value. The
- -- following formats are supported:
+ -- following time format is supported:
--
- -- yyyy*mm*dd hh:mm:ss - Delimiter '*' is either '-' or '/'
- -- yyyy*mm*dd - The time of day is set to 00:00:00
+ -- hh:mm:ss - Date is the current date
--
- -- yy*mm*dd hh:mm:ss - Year is assumend to be 20YY
- -- yy*mm*dd - The time of day is set to 00:00:00
+ -- The following formats are also supported. They all accept an optional
+ -- time with the format "hh:mm:ss". The time is separated from the date by
+ -- exactly one space character.
+ -- When the time is not specified, it is set to 00:00:00. The delimiter '*'
+ -- must be either '-' and '/' and both occurrences must use the same
+ -- character.
+ -- Trailing characters (in particular spaces) are not allowed.
--
- -- hh:mm:ss - Date is the current date
+ -- yyyy*mm*dd
+ -- yy*mm*dd - Year is assumed to be 20yy
+ -- mm*dd*yyyy - (US date format)
+ -- dd*mmm*yyyy - month spelled out
+ -- yyyy*mmm*dd - month spelled out
+ -- yyyymmdd - Iso format, no separator
+ -- mmm dd, yyyy - month spelled out
+ -- dd mmm yyyy - month spelled out
--
-- Constraint_Error is raised if the input string is malformatted or
-- the resulting time is not valid.