Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help with DATE::CALC $doy

Status
Not open for further replies.

calabama

Programmer
Feb 19, 2001
180
0
0
US
Greetings All
What is the best way to convert the Day_of_Year to text.
I dont see anything in the DATE::CALC module.
Any Ideas
Thanks Cal



In the begining
Let us first assume that there was nothing to begin with.
 
Why would you want to? I mean what's the purpose?
--Paul
 
I'm assuming you want something that will produce the ordinal value (i.e. 207 -> 207th, 231 -> 231st). If so you'd use English_Ordinal. Example:
Code:
use Date::Calc qw (English_Ordinal Day_of_Year Today);
print "Today is the ", English_Ordinal(Day_of_Year(Today())), " day of the year\n";
Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top