How do you go in php from a nth day in the year to the date like:
getdatefromday(275, 2012)
and it outputs a date (better if an object).
And I’d like to do the opposite too, like getdayoftheyear("21 oct 2012")
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is pretty easy all around. You should read up on the
DateTimeobject’screateFromFormatstatic method here, thedatefunction here and thestrtotimefunction here.