Wednesday, February 23, 2011

How to find a date ago a particular date


     require 'chronic'
     Chronic.parse('1 year ago')
=> Tue Feb 23 18:08:36 +0530 2010
>> Chronic.parse('1 day ago')
=> Tue Feb 22 18:08:46 +0530 2011
>> Chronic.parse('5 day ago')
=> Fri Feb 18 18:08:51 +0530 2011
>> Chronic.parse('23 day ago')
=> Mon Jan 31 18:09:01 +0530 2011
>> Chronic.parse('1 month ago')
=> Sun Jan 23 18:09:13 +0530 2011


1 comment:

  1. If you would like an alternative to randomly flirting with girls and trying to find out the right thing to do...

    If you'd prefer to have women chase YOU, instead of spending your nights prowling around in crowded pubs and night clubs...

    Then I encourage you to play this short video to find out a weird little secret that might get you your personal harem of attractive women:

    FACEBOOK SEDUCTION SYSTEM!!!

    ReplyDelete