SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 1999
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How Do I Manipulate Date/Time in PHP3?
    I want to be able to make a "last week news" and "monthly news archive" for my site.

    Thanks guys!

  2. #2
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you get your present date with mktime() , then use mktime() and date() to play with the date..

    mktime() gives you the number of seconds from january 1, 1969 ...

    date() can generate a verbal date with such a number ...

    you can subtract / add from that number to reach the month you want

    ------------------
    SitePoint Moderator
    my PHP host


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •