DateRange is a fairly simple php class. It’s main function is to create a range of dates - allowing you to quickly check to see if a given date is within that range.
DateRange stores the start and end dates as Unix timestamps, but it is designed to take either a timestamp or a formatted date string as input. It uses the php strtotime() function to convert from a string to a timestamp, so you’re free to use any strings that you know that function can normally convert.
The dateRange class has four main properties:
- $start - the start date
- $end - the end date
- $name - a display name for your daterange
- $exceptions - a list of dates that are considered “out of the range”
More popular Date & Time
- Ultimate PHP Date Time Script 1.0.0 (3 years, 3 months 1 day ago)
- Display human friendly relative dates and times 0.9 (2 years, 9 months 14 days ago)
- PHP dateRange Class 1.0 (3 years, 3 months 1 day ago)
- Opening hours 2.0 (3 years, 3 months 1 day ago)
- CountDown PHP Script (2 years, 11 months 2 days ago)