From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Time_Zone-aware Day_of_Week ? Date: Mon, 13 Jul 2015 09:45:44 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Mon, 13 Jul 2015 16:44:19 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="a3855fbfe1a666be9aefba0563039ed5"; logging-data="12567"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/BCZSqzf2ts3Mx4EXCjOwJAedMTifk74c=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: Cancel-Lock: sha1:Uky3aNTwwkkZcj6K9T/nhvW39M8= Xref: news.eternal-september.org comp.lang.ada:26805 Date: 2015-07-13T09:45:44-07:00 List-Id: On 07/13/2015 06:26 AM, Natasha Kerensikova wrote: > > Moreover, the description in the ARM of the function is quite terse: > "Returns the day of the week for Time. This is based on the Year, Month, > and Day values of Time." Presumably the Year, Month, and Day returned by Ada.Calendar.Split. > However, all of Year, Month and Day functions do have the Time_Zone > argument that Day_of_Week lacks. So which time offset is Day_of_Week > supposed to use? I'd guess the time offset given by Ada.Calendar.Time_Zones.UTC_Time_Offset. PragmARC.Date_Handler.Day_Of_Week gives you the day of week of any Year, Month, and Day CE you care to give it, even for values of Year outside Ada.Calendar.Year_Number. It can also give you the day of week for any Ada.Calendar.Time, using the Year, Month, and Day returned by Ada.Calendar.Split. The PragmAda Reusable Components are at https://pragmada.x10hosting.com/pragmarc.htm -- Jeff Carter "He that hath no beard is less than a man." Much Ado About Nothing 132