[optimization] calendar week ISO 8601 / DIN 1355

Robert Cole bobcole at earthlink.net
Tue Mar 30 16:05:09 EDT 2010


Malte and Sarah:
This should work for people who have PHP installed:
      on mouseUp
         put "php -r " & quote & "echo date('W',  
mktime(0,0,0,3,15,2010));" & quote into tPHPcommand
         put shell(tPHPcommand) into field "Test Results"
      end mouseUp
FYI,
Bob

On Mon, 29 Mar 2010 07:36:33 Sarah Reichelt <sarah.reichelt at gmail.com>  
wrote:

I haven't checked out your function yet Malte, but my DateTime library
<http://www.troz.net/rev/stacks/DateTime.rev>
has a weekNumISO() function contributed by the late, great Eric  
Chatonet.

Cheers,
Sarah

On Mon, Mar 29, 2010 at 6:52 AM, Malte Pfaff-Brill <revolution at derbrill.de 
 > wrote:
> Hi all,
> I needed to calculate the calendar week from a given date (as we do  
> it in germany and I think also in the rest of europe).
> I quickly hacked together a function implementing some of the info  
> found here: http://en.wikipedia.org/wiki/ISO_8601#Week_dates
> If anyone has any pointers on how to make this better, I´d  
> appreciate input. I hope if anyone needs to implement calendar weeks
> later this might be a helpful thread.
>
> Cheers,
>
> Malte




More information about the use-livecode mailing list