GitHub - computerminds/php-edtf: A VERY simple library of helpers for dealing with EDTF dates

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Repository files navigation

php-EDTF

Build Status

Usage

Use the factory to get instances of EDTFInfo:

$factory = new \ComputerMinds\EDTF\EDTFInfoFactory();
$dateInfo = $factory->create('1990-01');

Then you can call the various methods on the instance.

$valid = $dateInfo->isValid();
if ($valid) {
  $min = $dateInfo->getMin();
  $max = $dateInfo->getMax();
  // $min and $max are just standard PHP \DateTime instances.
  print $min->format('c');
}

About

A VERY simple library of helpers for dealing with EDTF dates

Resources

Readme

Activity

Custom properties

Stars

0 stars

Watchers

2 watching

Forks

0 forks

Languages