Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member aubreyisland's Avatar
    Join Date
    Oct 2005
    Posts
    125
    Member #
    11643
    I've been looking (still am), but maybe you guys know.

    My birthday is say October 12th 1981 how, in PHP, could I find out easily what day would that land on in 365 days in one year?

    Like someones birthday for February 2nd is 33 I believe......

    Anyone?

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    http://us3.php.net/date

    Look at the "z" formatted token. Convert your birthday to a UNIX timestamp via [phpfunction]mktime[/phpfunction] and then you can extract the day of year this way.

    You can also use http://us3.php.net/manual/en/function.getdate.php and get the yday index.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:07 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com