print [localtime]->[6], "\n"; # Outputs 2 for me, today, because it's Tuesday and weeks start at 0 for Sunday.