PHP Classes

Mezon PHP Date Time Functions Utilities: Perform useful operations with date and time

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 50 All time: 10,701 This week: 206Up
Version License PHP version Categories
mezon-date-time-util 1.0MIT/X Consortium ...5PHP 5, Time and Date
Description 

Author

This package can perform useful operations with date and time.

It provides several functions that can perform several types of operations with dates and times. Currently it can:

- Check is a given date is the date of today or yesterday
- Generate a text with the day and the month of a given date using localized texts for the month names read for configuration files

Picture of Alexey Dodonov
  Performance   Level  
Name: Alexey Dodonov <contact>
Classes: 58 packages by
Country: Russian Federation Russian Federation
Age: ???
All time rank: 184954 in Russian Federation Russian Federation
Week rank: 158 Up6 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 13x

Documentation

Utilities for data manipulation

Installation

Just print

composer require mezon/date-time-utils

Locale setup

You can specify necessary locale by setting up the DateTimeUtils::$locale variable. For example:

DateTimeUtils::$locale = 'en';

Methods

Method returns true if the passed date is today

DateTimeUtils::isToday(string $date):bool

Method returns true if the passed date was yesterday

DateTimeUtils::isYesterday(string $date):bool

Method returns day and literal representation of month from the date. For example the string "1 of july" will be returned for the date '2020-07-01'

DateTimeUtils::dayMonth(string $date): string


  Files folder image Files (7)  
File Role Description
Files folder imageres (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Plain text file DateTimeUtils.php Class Class source
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (7)  /  res  
File Role Description
Files folder imagel8n (2 files)

  Files folder image Files (7)  /  res  /  l8n  
File Role Description
  Accessible without login Plain text file en.json Data Auxiliary data
  Accessible without login Plain text file ru.json Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:50
This week:0
All time:10,701
This week:206Up