mattnewmedia Posted March 17, 2009 Share Posted March 17, 2009 Here's my code: $dDate=strtotime('last Monday'); $dDate=date("F m", $dDate); Everytime I run it I get March 03 which is several weeks ago. Does this have to do with leap year or something? Link to comment https://forums.phpfreaks.com/topic/149802-datef-m-last-monday-not-working/ Share on other sites More sharing options...
GingerRobot Posted March 17, 2009 Share Posted March 17, 2009 The error is in your format. 'm' is a numeric representation of the month. So, being march, you're getting 03. You should be using 'd'. Link to comment https://forums.phpfreaks.com/topic/149802-datef-m-last-monday-not-working/#findComment-786634 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.