Hello again wise monks :)
I have a list of weekdays:
my @weekdays = qw( Today Yesterday Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday );
I need to format these weekdays into an absolute numerical date based off of scalar localtime. eg:
my ($local_weekday, $local_month, $local_numerical_date) = split (/\s+ +/, scalar localtime), 3; __END__ Fri Apr 28 'Yesterday' would be '27'
I need to use $local_weekday and $local_numerical_date (eg. 'fri 28') to format @weekdays from the list. eg. 'wednesday' to eg. '26'.
Also, i never need to check what the numerical date in the future is, it is always current date or earlier. I am pretty sure there is a way to loop while subtracting but I cant figure it out lol.
If I can be any more clear on anything please let me know. I have tried to explain it the best i can :)
EDIT: changed 'wednesday 27' to just '27' and added 'Yesterday' would be '27' to __END__
In reply to Convert weekday to numerical date by james28909
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |