troubleshooting Question

Calculating the current day as a value

Avatar of wvanthony
wvanthony asked on
Scripting Languages
2 Comments1 Solution211 ViewsLast Modified:
I am trying to calculate the current day of the year as a value, and I am not sure what is wrong....today is Friday, August 19th, 2005 - day 231 of the year, by my count....when I run the following code, the result is 230:


# using Time::tm objects
use Time::localtime;
$tm = localtime;
$testday2 = $tm->yday;
print "here comes the testday2\n";
print $testday2;


Am I doing something wrong?  Any assistance would be greatly appreciated....thx!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros