You are here: Re: mktime « PHP « IT news, forums, messages
Re: mktime

Posted by "Brian P. O'Donnell" on 10/09/92 11:26

"Dan Brow" <dan@fullmotions.com> wrote in message
news:1126566475.31931.17.camel@localhost...
> A little confused with mktime, I'm trying to get how many days are in a
> year.
>
> $year = "2006";
> $epoch = mktime(0, 0, 0, 1, 0, $year); // I have to have 1 for month or
> I get which day it is now. Which sucks.
> $date = date("z Y", $epoch);
> print($date); // here is the problem, I get 365 days, but the year is
> 2005, not 2006, same goes for any year I put in.
>
> What am I doing wrong?

January 0th is December 31st last year

Brian

>
> Thanks,
> Dan.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация