picture picture
January 30, 2010 Outdoors & Nature 1 Comments

Trek to Kalawantin Durg

Blog in progress…coming soon!!!

November 23, 2009 PHP 0 Comments

Find start and end date of week in PHP

I need to check if the current day is a Monday and then figure out the dates of last week’s Monday and Sunday. Here is my solution which is simpler:

<!--?php <br ?--> if(date('N') == 1) {
$prior_week = date('W') - 1;
if($prior_week == 0) {
$prior_week = 52;
$year = date('Y') - 1;
$year = date('Y');

echo date("Y-m-d", strtotime($year.'W'.$prior_week.'1'));
echo date("Y-m-d", strtotime($year.'W'.$prior_week.'7'));


So if we have a Monday which we have when date(‘N’) is 1, we get the current week number of the year with date(‘W’). Last week’s number should then be that number minus one. Note that we need to take extra precautions to to switch the year to the prior year if we have to.

Finally we use the old date and strtotime combo to get the dates in any format we want, in this case as YYYY-MM-DD. The format used in the strtotime call is an ISO8601 format that incorporates the day of week number and the week of year number. Without strtotime’s ability to understand this format the above solution would not work.

September 2, 2009 Outdoors & Nature 0 Comments

Trek to Tunga Fort

Blog in progress…coming soon!!!

November 25, 2008 Developer Garage 0 Comments

OpenSocial Developers Conference in Pune – 20th Dec 2008

Just few days left for Opensocial developer garage’08 pune, (ODGPune08)

Nowadays website is incomplete without any opensocial application/widget and it has became more important then SEO,advertising,Link exchange for site marketing.

If you are not aware about what is opensocial and how it works.. then you can join Opensocial Developer Garage’08 which is going to held in pune on 20th Dec.

Organised by a group of OpenSocial enthusiasts from pune have come together to bring this event. The event is aimed to unite all the OpenSocial Application Developers from all over the country and just share/code/have fun and maybe inspire a few wannabee.

Saturday, 20th December

Tower C, Panchshil Tech Park
Yerwada Pune – 411006

For more information please visit : http://developergarage.in/

So see you there @ camp.

August 25, 2008 PHPCamp 0 Comments

PHPCamp in Pune – 2008

PHPCamp is a ‘ad-hoc gathering’ for PHP community. It similar to barcamp , but more focused towards PHP based web application development. This means that anyone can come to PHPCamp and participate.

Event Details

Date: 20th September 2008 (saturday) .

Time: 10:00am to 6:00pm (Whole day event) .

To register for PHPCamp register yourself at PHPCamp.org

To know more join phpcamp on google groups.