Skip to content

AxioCode/mynow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyNow

Load your own time in order to simulate the current date and time.

Why MyNow?

Installation with Composer

composer require axiocode/mynow

Usage

Create the .time file in your directory with the timestamp of desired date and time.

245671200

You can then load .time in your application with:

$mynow = MyNow\MyNow::create(__DIR__);

Replace all calls to the default DateTime() constructor by MyNow DateTime.

$now = MyNow\DateTime();

If MyNow is not used or no file exists, the default DateTime instance will be used without to break your code.

Loaders

Currently only text loader is supported.

Different loaders may be provided to load date/time from different sources such as a database, YAML, etc.

License

MyNow is licensed under The BSD 3-Clause License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages