Find Jobs
Hire Freelancers

Flexible date parser

$30-5000 USD

Cancelled
Posted over 14 years ago

$30-5000 USD

Paid on delivery
I am in need of a flexible PHP date parser class that can convert written English dates (both absolute and relative) to a fixed format (e.g. YYYY-MM-DD). Importantly, the code must be CLEAN and CLEAR (with comments), in such a way that new rules/patterns can be easily added and removed, with important date manipulation functions abstracted and factored into their own methods. The class should be written as a PHP class with a public static method parse(string) and give the following results: Relative examples (assuming server has date 2009-10-08): "a day ago" => 2009-10-07 "three days ago" => 2009-10-05 "2 wks ago" => 2009-09-24 "tomorrow" => 2009-10-09 "next monday" => 2009-10-14 "next month" => 2009-11-01 "in 2 months" => 2009-12-08 "last month" => 2009-09-01 "in three days" => 2009-10-11 Absolute examples (assuming same server date as above): "November 1st" => 2009-11-01 "3 December" => 2009-12-03 "September 19 => 2010-09-19 "2010/09/10" => 2010-09-10 "2009/31/12" => 2009-12-31 (notice that yyyy/mm/dd is impossible!) "1992-10-22" => 1992-10-22 "August 23, 2010" => 2010-08-23 "31 October 1990" => 1990-11-31 ## Deliverables Must not rely on other packages, non-standard classes, etc. That is, it must be fully contained within itself and can only use what's available in the PHP5 library (no deprecated methods either).
Project ID: 2912466

About the project

3 proposals
Remote project
Active 15 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $50 USD for this job
User Avatar
See private message.
$42.50 USD in 14 days
5.0 (22 reviews)
4.4
4.4
User Avatar
See private message.
$85 USD in 14 days
5.0 (27 reviews)
3.0
3.0
User Avatar
See private message.
$21.25 USD in 14 days
1.0 (1 review)
0.0
0.0

About the client

Flag of UNITED STATES
United States
0.0
0
Member since Oct 9, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.