[jawsscripts] Re: Week number

  • From: "Mike" <mike_sharp@xxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 18 Mar 2010 18:44:22 -0000

Jim,

This is great, just what I was looking for. I have changed it a little so it 
acts as a function and returns a string, I have also changed it so I can put 
in any day or month and it returns the week number.

Now for something more difficult... how about returning what the tax week 
number is considering the tax week starts at 1 on 6th April?

Regards,
Mike

--------------------------------------------------
From: "Jim Bauer" <holdsworthfan@xxxxxx>
Sent: Friday, March 12, 2010 3:45 PM
To: <jawsscripts@xxxxxxxxxxxxx>
Subject: [jawsscripts] Re: Week number

> This should get you started.
> ----------
> Script getWeekNumber ()
> var
> int nmon, int nday, int totdays,
> string smondays,
> int nweek
>
> let nmon = stringToInt(sysGetDate("M")) ;auto-expands for any 2 digit
> returns
> let nday = stringToInt(sysGetDate("d"))
> let smondays = "31 28 31 30 31 30 31 31 30 31 30 31" ;leap years are
> irrelevant here
> let nmon = nmon - 1
> while nmon
> let totdays = totdays + stringToInt(stringSegment(smondays, " ",
> nmon))
> let nmon = nmon - 1
> endWhile
>
> let totdays = totdays + nday
> let nweek = totdays / 7
> if totdays % 7 > 0 && nweek < 52 then
> let nweek = nweek + 1
> endIf
>
> sayString("This is week " + intToString(nweek) + ".\n")
> EndScript
>
> ----------
> "Michael" <mike_sharp@xxxxxxxxxxxxx> wrote on Thu, 11 Mar 2010
> 18:17:56 -0000:
>
>>Hi all,
>>
>>I have seen scripts for extracting the system date and time but can JAWS
>>take the system date and tell you which week of the year you are in?
>>
>>Regards,
>>
>>Mike
>>
>>--------------------------------------------------
>>From: <benedicjr@xxxxxxxxxxx>
>>Sent: Thursday, March 11, 2010 11:16 AM
>>To: <jawsscripts@xxxxxxxxxxxxx>
>>Subject: [jawsscripts] Help for writing scripts
>>
>>> Hi. Anyone here know PopPeeper? I try to make an automatic read function
>>> for some items in the status bar through using a frame. But I found out
>>> that it's not stable so that's why I want to make scripts with same
>>> function. I try to study but still no idea how that works. Can you 
>>> please
>>> help me to write this functions? Or will you write some for me? Please,
>>> it would be a great help. Thanks...
>>>
>>> JR
>>> __________
>>> Visit and contribute to The JAWS Script Repository 
>>> http://jawsscripts.com
>>>
>>> View the list's information and change your settings at
>>> //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
>>//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
> //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 
//www.freelists.org/list/jawsscripts

Other related posts: