[jawsscripts] Re: Day Of Week format and usage of SysGetDate

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Fri, 12 Dec 2008 14:27:08 -0500

This is actually not because the interpreter is picky.  It's because
the function is picky. <smile>

The format strings for SysGetDate() and SysGetTime() allow a number
of substrings that are translated into specific parts of the
date/time.  I don't remember if there's a definitive reference
somewhere for what these functions accept, but I'll provide my own
reference below.  Warning:  Case matters below, and JAWS will make
three M's and 4 M's, etc., sound alike by default.

        d or dd: Two-digit day number (with or without leading 0).
        ddd: Three-letter week day abbreviation.
        dddd: Full week day name.
        M or MM: Two-digit month number (with or without leading 0).
        MMM: Three-letter month name abbreviation.
        MMMM: Full month name.
        y: One-digit year (probably not useful).
        y: Two-digit year, e.g., 08.
        yyy and yyyy: Full four-digit year.

and sysGetTime:

        h or hh: 12-hour hour (with or without leading 0).
        H or HH: Same but with 24-hour format hours.
        m or mm: Minute.
        s or ss: Second.
        t: A or P (upper case) for 12-hour formats.
        tt: AM or PM.

On Fri, Dec 12, 2008 at 01:54:32PM -0500, Martin wrote:
Ah, thanks for that.  What a picky interpreter. <smile>

> Date:        Fri, 12 Dec 2008 13:17:41 -0500
> From:        "David Farough" <David.Farough@xxxxxxxxxxxxx>
> To:        <jawsscripts@xxxxxxxxxxxxx>
> ReplyTo:    jawsscripts@xxxxxxxxxxxxx
> Subject:    [jawsscripts] Re: Day Of Week format and usage of SysGetDate
>
> Hi Martin:
> First of all, this syntax will work.
> GetDayOfWeek (SysGetDate ("yyyy/MM/dd"))
>
> If you want to use the optional parameter you would specify either "L"
> for the long day which is the default, or "S" which will provide the
> abbreviated day string.  This is optional as I mentioned earlier so
> unless you want the abbreviated day string , you can leave it out.
> Also, If you were using the insert I script in script manager to code
> this function call, you need to remove the comma for the optional
> parameter if you are not going to use it.  I noticed that this was not
> done when I activated the finish button.
>
> Now about the quirk in the SysGetDate function.
>
> I noticed that you have to be careful when specifying the format for the
> date to be returned.   The case used for the date format has to be
> specific.  I found that the month had to be specified using upper case
> MM  and that the year and day formats need to be specified using Lower
> case characters.  Therefore, to use this function with the GetDayOfWeek
> function, You need to use the following format string for the SysGetDate
> function: "yyyy/MM/dd"
>
> I was using Jaws 10.512.
>
>
>
>
> David Farough
> Application Accessibility Coordinator/coordonateur de l'accessibilit?
> Information Technology Services Directorate /
> Direction des services d'information technologiques
> Public Service Commission / Commission de la fonction publique Email /
> Courriel:  David.Farough@xxxxxxxxxxxxx
> Tel. / T?l:    (613) 992-2779
>
> >>> "Martin" <martinfc@xxxxxxxxxx> 04:30 pm Thursday, December 11, 2008
> >>>
> Hello there,
> I'm trying to use the getDayOfWeek() function, however I keep getting a
> syntax error.
> Can someone give me an example on how this function should be
> structured.
> I'd like to copy the result into a string variable.
> Thanks,
> Martin
>
>
> __________?
> Visit and contribute to The JAWS Script Repository
> http://jawsscripts.com
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
> __________?
> Visit and contribute to The JAWS Script Repository
> http://jawsscripts.com
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts


__________?
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: