2017 © Pedro Peláez
 

library datetimems

PHP DateTime class with the microseconds and conversion to a millisecond timestamp and vise versa

image

krocos/datetimems

PHP DateTime class with the microseconds and conversion to a millisecond timestamp and vise versa

  • Friday, January 6, 2017
  • by krocos
  • Repository
  • 1 Watchers
  • 0 Stars
  • 75 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

DateTimeMs

Helps with conversions of JS-timestamps to \DateTime objects and to save a date and a time to database with microseconds (PHP and PostgreSQL (rof example) use microseconds internal, not milliseconds)., (*1)

Creating

Creating \DateTime object with milliseconds:, (*2)

use Krocos\DateTimeMs\DateTimeMs;

$dateTimeWithMilliseconds = DateTimeMs::newDateTimeMs();

Converting

Converting to millisecond timestamp:, (*3)

use Krocos\DateTimeMs\DateTimeMs;

$msTimestamp = DateTimeMs::dateTimeToMsTimestamp($datetimeObject)

Converting from a millisecond timestamp to \DateTime object with milliseconds:, (*4)

use Krocos\DateTimeMs\DateTimeMs;

$msDatetime = DateTimeMs::msTimestampToDateTime($msTimestamp);

The Versions

06/01 2017

dev-master

9999999-dev

PHP DateTime class with the microseconds and conversion to a millisecond timestamp and vise versa

  Sources   Download

The Requires

  • php ^7.0

 

The Development Requires

by Balin Vladimir

06/01 2017

1.0.0

1.0.0.0

PHP DateTime class with the microseconds and conversion to a millisecond timestamp and vise versa

  Sources   Download

The Requires

  • php ^7.0

 

The Development Requires

by Balin Vladimir