Mostly for Mark:
I am looking for perl, php and mysql functions to produce the exact same
iso week number (yes, there are 7 modes of this, based on my research)
the custom iso_week() function seems to be the same if not exactly the
same as mysql WEEK(time,3) (mode 3), and for that matter, the same as
DateTime.pm.
(first week of year is first week with a thursday in it, or, first week,
starting on monday with 4 or more days..., so dec 28, 2008 is year 2008,
week 52, jan 1, 2009 is year 2008, week 52 )
is there any reason you wrote a function rather then used one? aside
from one more module that would need to be included?
for anyone researching this, for perl, its DateTime.pm:
use DateTime;
use Time::Local;
my $day,$mon,$yr,$julian;
(undef,undef,undef,$day,$mon,$yr) =
localtime($julian);
$yr += 1900;
$mon += 1;
print ("year $yr, mon: $mon, day, $day\n");
$my dt = DateTime->new(
year => $yr,
day => $day,
month => $mon,
)
print ($dt->week_number);
for php, its built in date();
print date('W',$julian);
and, mysql is
select WEEK(from_unixtime(julian),3);
--
Michael Scheidell, CTO
Phone: 561-999-5000, x 1259
> *| *SECNAP Network Security Corporation
* Certified SNORT Integrator
* 2008-9 Hot Company Award Winner, World Executive Alliance
* Five-Star Partner Program 2009, VARBusiness
* Best Anti-Spam Product 2008, Network Products Guide
* King of Spam Filters, SC Magazine 2008
_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r).
For Information please see http://www.spammertrap.com
_________________________________________________________________________
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/