geeky

a datefrom PHP function

while coding for blogmatch today, I wrote a simple function. it returns the date that’s N days from a date you specify. For example, if you provide 2004/03/01 as the input date, it should return 2004/02/29 if you want to find out the date right before 2004/03/01.

The function is pretty straight forward and handy. You provide a date with its month, day and year and how many days before or after that date. It will return an array with keys: year, month and day. read more about it here or you can get the complete source code plus examples here.

2 thoughts on “a datefrom PHP function

  1. Cool function… maybe when I get settled in with school I can get back to work on my PHP knowledge lol

    Btw – I’ve started my Computer Science curriculum as of Monday… we’re learning C++ at the moment 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s