Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/810535/?format=api
{ "id": 810535, "url": "http://patchwork.ozlabs.org/api/patches/810535/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20170906115641.GA140767@adacore.com/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170906115641.GA140767@adacore.com>", "list_archive_url": null, "date": "2017-09-06T11:56:41", "name": "[Ada] Time_IO.Value enhanced to parse ISO-8861 UTC date and time", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "7024406d1498da0f2f8b4275e3ad0546d3117174", "submitter": { "id": 4418, "url": "http://patchwork.ozlabs.org/api/people/4418/?format=api", "name": "Arnaud Charlet", "email": "charlet@adacore.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20170906115641.GA140767@adacore.com/mbox/", "series": [ { "id": 1776, "url": "http://patchwork.ozlabs.org/api/series/1776/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=1776", "date": "2017-09-06T11:56:41", "name": "[Ada] Time_IO.Value enhanced to parse ISO-8861 UTC date and time", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1776/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/810535/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/810535/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-return-461590-incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "mailing list gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461590-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"S6zTl01T\"; dkim-atps=neutral", "sourceware.org; auth=none" ], "Received": [ "from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xnMWY0xfDz9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 6 Sep 2017 21:56:56 +1000 (AEST)", "(qmail 54505 invoked by alias); 6 Sep 2017 11:56:46 -0000", "(qmail 54232 invoked by uid 89); 6 Sep 2017 11:56:45 -0000", "from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tWed, 06 Sep 2017 11:56:43 +0000", "from localhost (localhost.localdomain [127.0.0.1])\tby\n\tfiltered-rock.gnat.com (Postfix) with ESMTP id 0F0825614F;\n\tWed, 6 Sep 2017 07:56:42 -0400 (EDT)", "from rock.gnat.com ([127.0.0.1])\tby localhost (rock.gnat.com\n\t[127.0.0.1]) (amavisd-new, port 10024)\twith LMTP id\n\tKgaHw6QN6pMv; Wed, 6 Sep 2017 07:56:41 -0400 (EDT)", "from tron.gnat.com (tron.gnat.com\n\t[IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294])\tby rock.gnat.com\n\t(Postfix) with ESMTP id F11B85614D;\n\tWed, 6 Sep 2017 07:56:41 -0400 (EDT)", "by tron.gnat.com (Postfix, from userid 4192)\tid ED6194AC;\n\tWed, 6 Sep 2017 07:56:41 -0400 (EDT)" ], "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:message-id:mime-version:content-type; q=dns;\n\ts=default; b=fWnmJSnFg3KWgfgvq8sqzYqcE7nJM+XsI3SgIrEFbWJ6b8bf4S\n\tA+OZ3gbxkPJ7h5LSUwPLm4vZFXH+0ZNVijTGTsmd5qR2IwHouDlA7wJYNsIxYPzz\n\trWHAd6Sw18gmwXR0HTBeaEaw8v44hLqEo+zh5BhCODf1kZDTAXpCkjsHw=", "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:message-id:mime-version:content-type; s=\n\tdefault; bh=F53K9D1z6d34sK8cycCCe50BohE=; b=S6zTl01TTrB5fBIBPykh\n\tiUDtHqcHSIqXgxanwj5qqvD/a0cUINYDoSWDuwGhQDQXDY/OMcBp4t1yyvg58oLr\n\t4j8ZqEfrpUiJWIA28W3Ot/UXm4HZpjCbaLcW0PCNJYYgejeE4XosdFtqdpWDYKdN\n\tWLrORKF+sFsRYotVuq2auLY=", "Mailing-List": "contact gcc-patches-help@gcc.gnu.org; run by ezmlm", "Precedence": "bulk", "List-Id": "<gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>", "List-Archive": "<http://gcc.gnu.org/ml/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-help@gcc.gnu.org>", "Sender": "gcc-patches-owner@gcc.gnu.org", "X-Virus-Found": "No", "X-Spam-SWARE-Status": "No, score=-16.1 required=5.0 tests=BAYES_00, GIT_PATCH_1,\n\tGIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS,\n\tRCVD_IN_DNSWL_NONE,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=confirms, fraction,\n\tSEP, JUL", "X-HELO": "rock.gnat.com", "Date": "Wed, 6 Sep 2017 07:56:41 -0400", "From": "Arnaud Charlet <charlet@adacore.com>", "To": "gcc-patches@gcc.gnu.org", "Cc": "Javier Miranda <miranda@adacore.com>", "Subject": "[Ada] Time_IO.Value enhanced to parse ISO-8861 UTC date and time", "Message-ID": "<20170906115641.GA140767@adacore.com>", "MIME-Version": "1.0", "Content-Type": "multipart/mixed; boundary=\"gKMricLos+KVdGMg\"", "Content-Disposition": "inline", "User-Agent": "Mutt/1.5.23 (2014-03-12)" }, "content": "The function Value of package GNAT.Calendar.Time_IO has been enhanced\nto parse strings containing UTC date and time.\n\nAfter this patch the following test works fine.\n\nwith Ada.Calendar; use Ada.Calendar;\nwith Ada.Text_IO; use Ada.Text_IO;\nwith GNAT.Calendar.Time_IO; use GNAT.Calendar.Time_IO;\n\nprocedure Do_Test is\n Picture : Picture_String := \"%Y-%m-%dT%H:%M:%S,%i\";\n T1 : Time;\n T2 : Time;\n T3 : Time;\n T4 : Time;\n T5 : Time;\nbegin\n T1 := Value (\"2017-04-14T14:47:06\");\n pragma Assert (Image (T1, Picture) = \"2017-04-14T14:47:06,000\");\n\n T2 := Value (\"2017-04-14T14:47:06Z\");\n pragma Assert (Image (T2, Picture) = \"2017-04-14T14:47:06,000\");\n\n T3 := Value (\"2017-04-14T14:47:06,999\");\n pragma Assert (Image (T3, Picture) = \"2017-04-14T14:47:06,999\");\n\n T4 := Value (\"2017-04-14T19:47:06+05\");\n pragma Assert (Image (T4, Picture) = \"2017-04-14T14:47:06,000\");\n\n T5 := Value (\"2017-04-14T09:00:06-05:47\");\n pragma Assert (Image (T5, Picture) = \"2017-04-14T14:47:06,000\");\nend;\n\nCommand: gnatmake -gnata do_test.adb; ./do_test\n\nTested on x86_64-pc-linux-gnu, committed on trunk\n\n2017-09-06 Javier Miranda <miranda@adacore.com>\n\n\t* g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time\n\tfollowing ISO-8861.", "diff": "Index: g-catiio.adb\n===================================================================\n--- g-catiio.adb\t(revision 251753)\n+++ g-catiio.adb\t(working copy)\n@@ -6,7 +6,7 @@\n -- --\n -- B o d y --\n -- --\n--- Copyright (C) 1999-2016, AdaCore --\n+-- Copyright (C) 1999-2017, AdaCore --\n -- --\n -- GNAT is free software; you can redistribute it and/or modify it under --\n -- terms of the GNU General Public License as published by the Free Soft- --\n@@ -93,6 +93,26 @@\n Length : Natural := 0) return String;\n -- As above with N provided in Integer format\n \n+ procedure Parse_ISO_8861_UTC\n+ (Date : String;\n+ Time : out Ada.Calendar.Time;\n+ Success : out Boolean);\n+ -- Subsidiary of function Value. It parses the string Date, interpreted as\n+ -- an ISO 8861 time representation, and returns corresponding Time value.\n+ -- Success is set to False when the string is not a supported ISO 8861\n+ -- date. The following regular expression defines the supported format:\n+ --\n+ -- (yyyymmdd | yyyy'-'mm'-'dd)'T'(hhmmss | hh':'mm':'ss)\n+ -- [ ('Z' | ('.' | ',') s{s} | ('+'|'-')hh':'mm) ]\n+ --\n+ -- Trailing characters (in particular spaces) are not allowed.\n+ --\n+ -- Examples:\n+ --\n+ -- 2017-04-14T14:47:06 20170414T14:47:06 20170414T144706\n+ -- 2017-04-14T14:47:06,12 20170414T14:47:06.12\n+ -- 2017-04-14T19:47:06+05 20170414T09:00:06-05:47\n+\n -----------\n -- Am_Pm --\n -----------\n@@ -531,7 +551,7 @@\n \"JUL\", \"AUG\", \"SEP\", \"OCT\", \"NOV\", \"DEC\");\n -- Short version of the month names, used when parsing date strings\n \n- S : String := Str;\n+ S : String := Str;\n \n begin\n GNAT.Case_Util.To_Upper (S);\n@@ -545,6 +565,390 @@\n return Abbrev_Upper_Month_Names'First;\n end Month_Name_To_Number;\n \n+ ------------------------\n+ -- Parse_ISO_8861_UTC --\n+ ------------------------\n+\n+ procedure Parse_ISO_8861_UTC\n+ (Date : String;\n+ Time : out Ada.Calendar.Time;\n+ Success : out Boolean)\n+ is\n+ Index : Positive := Date'First;\n+ -- The current character scan index. After a call to Advance, Index\n+ -- points to the next character.\n+\n+ End_Of_Source_Reached : exception;\n+ -- An exception used to signal that the scan pointer has reached the\n+ -- end of the source string.\n+\n+ Wrong_Syntax : exception;\n+ -- An exception used to signal that the scan pointer has reached an\n+ -- unexpected character in the source string.\n+\n+ procedure Advance;\n+ pragma Inline (Advance);\n+ -- Past the current character of Date\n+\n+ procedure Advance_Digits (Num_Digits : Positive);\n+ pragma Inline (Advance_Digits);\n+ -- Past the given number of digit characters\n+\n+ function Scan_Day return Day_Number;\n+ pragma Inline (Scan_Day);\n+ -- Scan the two digits of a day number and return its value\n+\n+ function Scan_Hour return Hour_Number;\n+ pragma Inline (Scan_Hour);\n+ -- Scan the two digits of an hour number and return its value\n+\n+ function Scan_Minute return Minute_Number;\n+ pragma Inline (Scan_Minute);\n+ -- Scan the two digits of a minute number and return its value\n+\n+ function Scan_Month return Month_Number;\n+ pragma Inline (Scan_Month);\n+ -- Scan the two digits of a month number and return its value\n+\n+ function Scan_Second return Second_Number;\n+ pragma Inline (Scan_Second);\n+ -- Scan the two digits of a second number and return its value\n+\n+ function Scan_Separator (Expected_Symbol : Character) return Boolean;\n+ pragma Inline (Scan_Separator);\n+ -- If the current symbol matches the Expected_Symbol then advance the\n+ -- scanner index and return True; otherwise do nothing and return False\n+\n+ procedure Scan_Separator (Required : Boolean; Separator : Character);\n+ pragma Inline (Scan_Separator);\n+ -- If Required then check that the current character matches Separator\n+ -- and advance the scanner index; if not Required then do nothing.\n+\n+ function Scan_Subsecond return Second_Duration;\n+ pragma Inline (Scan_Subsecond);\n+ -- Scan all the digits of a subsecond number and return its value\n+\n+ function Scan_Year return Year_Number;\n+ pragma Inline (Scan_Year);\n+ -- Scan the four digits of a year number and return its value\n+\n+ function Symbol return Character;\n+ pragma Inline (Symbol);\n+ -- Return the current character being scanned\n+\n+ -------------\n+ -- Advance --\n+ -------------\n+\n+ procedure Advance is\n+ begin\n+ -- Signal the end of the source string. This stops a complex scan by\n+ -- bottoming up any recursive calls till control reaches routine Scan\n+ -- which handles the exception. Certain scanning scenarios may handle\n+ -- this exception on their own.\n+\n+ if Index > Date'Last then\n+ raise End_Of_Source_Reached;\n+\n+ -- Advance the scan pointer as long as there are characters to scan,\n+ -- in other words, the scan pointer has not passed the end of the\n+ -- source string.\n+\n+ else\n+ Index := Index + 1;\n+ end if;\n+ end Advance;\n+\n+ --------------------\n+ -- Advance_Digits --\n+ --------------------\n+\n+ procedure Advance_Digits (Num_Digits : Positive) is\n+ begin\n+ for J in 1 .. Num_Digits loop\n+ if Symbol not in '0' .. '9' then\n+ raise Wrong_Syntax;\n+ end if;\n+\n+ Advance; -- past digit\n+ end loop;\n+ end Advance_Digits;\n+\n+ --------------\n+ -- Scan_Day --\n+ --------------\n+\n+ function Scan_Day return Day_Number is\n+ From : constant Positive := Index;\n+ begin\n+ Advance_Digits (Num_Digits => 2);\n+ return Day_Number'Value (Date (From .. Index - 1));\n+ end Scan_Day;\n+\n+ ---------------\n+ -- Scan_Hour --\n+ ---------------\n+\n+ function Scan_Hour return Hour_Number is\n+ From : constant Positive := Index;\n+ begin\n+ Advance_Digits (Num_Digits => 2);\n+ return Hour_Number'Value (Date (From .. Index - 1));\n+ end Scan_Hour;\n+\n+ -----------------\n+ -- Scan_Minute --\n+ -----------------\n+\n+ function Scan_Minute return Minute_Number is\n+ From : constant Positive := Index;\n+ begin\n+ Advance_Digits (Num_Digits => 2);\n+ return Minute_Number'Value (Date (From .. Index - 1));\n+ end Scan_Minute;\n+\n+ ----------------\n+ -- Scan_Month --\n+ ----------------\n+\n+ function Scan_Month return Month_Number is\n+ From : constant Positive := Index;\n+ begin\n+ Advance_Digits (Num_Digits => 2);\n+ return Month_Number'Value (Date (From .. Index - 1));\n+ end Scan_Month;\n+\n+ -----------------\n+ -- Scan_Second --\n+ -----------------\n+\n+ function Scan_Second return Second_Number is\n+ From : constant Positive := Index;\n+ begin\n+ Advance_Digits (Num_Digits => 2);\n+ return Second_Number'Value (Date (From .. Index - 1));\n+ end Scan_Second;\n+\n+ --------------------\n+ -- Scan_Separator --\n+ --------------------\n+\n+ function Scan_Separator (Expected_Symbol : Character) return Boolean is\n+ begin\n+ if Symbol = Expected_Symbol then\n+ Advance;\n+ return True;\n+ else\n+ return False;\n+ end if;\n+ end Scan_Separator;\n+\n+ --------------------\n+ -- Scan_Separator --\n+ --------------------\n+\n+ procedure Scan_Separator (Required : Boolean; Separator : Character) is\n+ begin\n+ if Required then\n+ if Symbol /= Separator then\n+ raise Wrong_Syntax;\n+ end if;\n+\n+ Advance; -- Past the separator\n+ end if;\n+ end Scan_Separator;\n+\n+ --------------------\n+ -- Scan_Subsecond --\n+ --------------------\n+\n+ function Scan_Subsecond return Second_Duration is\n+ From : constant Positive := Index;\n+ begin\n+ Advance_Digits (Num_Digits => 1);\n+\n+ while Symbol in '0' .. '9'\n+ and then Index < Date'Length\n+ loop\n+ Advance;\n+ end loop;\n+\n+ if Symbol not in '0' .. '9' then\n+ raise Wrong_Syntax;\n+ end if;\n+\n+ Advance;\n+ return Second_Duration'Value (\"0.\" & Date (From .. Index - 1));\n+ end Scan_Subsecond;\n+\n+ ---------------\n+ -- Scan_Year --\n+ ---------------\n+\n+ function Scan_Year return Year_Number is\n+ From : constant Positive := Index;\n+ begin\n+ Advance_Digits (Num_Digits => 4);\n+ return Year_Number'Value (Date (From .. Index - 1));\n+ end Scan_Year;\n+\n+ ------------\n+ -- Symbol --\n+ ------------\n+\n+ function Symbol return Character is\n+ begin\n+ -- Signal the end of the source string. This stops a complex scan by\n+ -- bottoming up any recursive calls till control reaches routine Scan\n+ -- which handles the exception. Certain scanning scenarios may handle\n+ -- this exception on their own.\n+\n+ if Index > Date'Last then\n+ raise End_Of_Source_Reached;\n+\n+ else\n+ return Date (Index);\n+ end if;\n+ end Symbol;\n+\n+ -- Local variables\n+\n+ Date_Separator : constant Character := '-';\n+ Hour_Separator : constant Character := ':';\n+ Day : Day_Number;\n+ Month : Month_Number;\n+ Year : Year_Number;\n+ Hour : Hour_Number := 0;\n+ Minute : Minute_Number := 0;\n+ Second : Second_Number := 0;\n+ Subsec : Second_Duration := 0.0;\n+\n+ Local_Hour : Hour_Number := 0;\n+ Local_Minute : Minute_Number := 0;\n+ Local_Sign : Character := ' ';\n+ Local_Disp : Duration;\n+\n+ Sep_Required : Boolean := False;\n+ -- True if a separator is seen (and therefore required after it!)\n+\n+ begin\n+ -- Parse date\n+\n+ Year := Scan_Year;\n+ Sep_Required := Scan_Separator (Date_Separator);\n+\n+ Month := Scan_Month;\n+ Scan_Separator (Sep_Required, Date_Separator);\n+\n+ Day := Scan_Day;\n+\n+ if Index < Date'Last and then Symbol = 'T' then\n+ Advance;\n+\n+ -- Parse time\n+\n+ Hour := Scan_Hour;\n+ Sep_Required := Scan_Separator (Hour_Separator);\n+\n+ Minute := Scan_Minute;\n+ Scan_Separator (Sep_Required, Hour_Separator);\n+\n+ Second := Scan_Second;\n+\n+ -- [('Z' | ('.' | ',') s{s} | ('+'|'-')hh:mm)]\n+\n+ if Index <= Date'Last then\n+\n+ -- Suffix 'Z' just confirms that this is an UTC time. No further\n+ -- action needed.\n+\n+ if Symbol = 'Z' then\n+ Advance;\n+\n+ -- A decimal fraction shall have at least one digit, and has as\n+ -- many digits as supported by the underlying implementation.\n+ -- The valid decimal separators are those specified in ISO 31-0,\n+ -- i.e. the comma [,] or full stop [.]. Of these, the comma is\n+ -- the preferred separator of ISO-8861.\n+\n+ elsif Symbol = ',' or else Symbol = '.' then\n+ Advance; -- past decimal separator\n+ Subsec := Scan_Subsecond;\n+\n+ -- Difference between local time and UTC: It shall be expressed\n+ -- as positive (i.e. with the leading plus sign [+]) if the local\n+ -- time is ahead of or equal to UTC of day and as negative (i.e.\n+ -- with the leading minus sign [-]) if it is behind UTC of day.\n+ -- The minutes time element of the difference may only be omitted\n+ -- if the difference between the time scales is exactly an\n+ -- integral number of hours.\n+\n+ elsif Symbol = '+' or else Symbol = '-' then\n+ Local_Sign := Symbol;\n+ Advance;\n+ Local_Hour := Scan_Hour;\n+\n+ -- Past ':'\n+\n+ if Index < Date'Last and then Symbol = Hour_Separator then\n+ Advance;\n+ Local_Minute := Scan_Minute;\n+ end if;\n+\n+ -- Compute local displacement\n+\n+ Local_Disp := Local_Hour * 3600.0 + Local_Minute * 60.0;\n+ else\n+ raise Wrong_Syntax;\n+ end if;\n+ end if;\n+ end if;\n+\n+ -- Sanity checks. The check on Index ensures that there are no trailing\n+ -- characters.\n+\n+ if Index /= Date'Length + 1\n+ or else not Year'Valid\n+ or else not Month'Valid\n+ or else not Day'Valid\n+ or else not Hour'Valid\n+ or else not Minute'Valid\n+ or else not Second'Valid\n+ or else not Subsec'Valid\n+ or else not Local_Hour'Valid\n+ or else not Local_Minute'Valid\n+ then\n+ raise Wrong_Syntax;\n+ end if;\n+\n+ -- Compute time without local displacement\n+\n+ if Local_Sign = ' ' then\n+ Time := Time_Of (Year, Month, Day, Hour, Minute, Second, Subsec);\n+\n+ -- Compute time with positive local displacement\n+\n+ elsif Local_Sign = '+' then\n+ Time := Time_Of (Year, Month, Day, Hour, Minute, Second, Subsec)\n+ - Local_Disp;\n+\n+ -- Compute time with negative local displacement\n+\n+ elsif Local_Sign = '-' then\n+ Time := Time_Of (Year, Month, Day, Hour, Minute, Second, Subsec)\n+ + Local_Disp;\n+ end if;\n+\n+ -- Notify that the input string was successfully parsed\n+\n+ Success := True;\n+\n+ exception\n+ when End_Of_Source_Reached |\n+ Wrong_Syntax =>\n+ Success := False;\n+ end Parse_ISO_8861_UTC;\n+\n -----------\n -- Value --\n -----------\n@@ -757,11 +1161,22 @@\n \n -- Local Declarations\n \n+ Success : Boolean;\n Time_Start : Natural := 1;\n+ Time : Ada.Calendar.Time;\n \n -- Start of processing for Value\n \n begin\n+ -- Let's try parsing Date as a supported ISO-8861 format. If we do not\n+ -- succeed, then retry using all the other GNAT supported formats.\n+\n+ Parse_ISO_8861_UTC (Date, Time, Success);\n+\n+ if Success then\n+ return Time;\n+ end if;\n+\n -- Length checks\n \n if D_Length /= 8\nIndex: g-catiio.ads\n===================================================================\n--- g-catiio.ads\t(revision 251753)\n+++ g-catiio.ads\t(working copy)\n@@ -6,7 +6,7 @@\n -- --\n -- S p e c --\n -- --\n--- Copyright (C) 1999-2013, AdaCore --\n+-- Copyright (C) 1999-2017, AdaCore --\n -- --\n -- GNAT is free software; you can redistribute it and/or modify it under --\n -- terms of the GNU General Public License as published by the Free Soft- --\n@@ -141,6 +141,18 @@\n -- mmm dd, yyyy - month spelled out\n -- dd mmm yyyy - month spelled out\n --\n+ -- The following ISO-8861 format expressed as a regular expression is also\n+ -- supported:\n+ --\n+ -- (yyyymmdd | yyyy'-'mm'-'dd)'T'(hhmmss | hh':'mm':'ss)\n+ -- [ ('Z' | ('.' | ',') s{s} | ('+'|'-')hh':'mm) ]\n+ --\n+ -- Examples:\n+ --\n+ -- 2017-04-14T14:47:06 20170414T14:47:06 20170414T144706\n+ -- 2017-04-14T14:47:06,1234 20170414T14:47:06.1234\n+ -- 2017-04-14T19:47:06+05 20170414T09:00:06-05:47\n+\n -- Constraint_Error is raised if the input string is malformed (does not\n -- conform to one of the above dates, or has an invalid time string), or\n -- the resulting time is not valid.\n", "prefixes": [ "Ada" ] }