Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/peekandpoke/php-types

Basic types for PHP like Enums, LocalDate etc
https://github.com/peekandpoke/php-types

Last synced: about 2 months ago
JSON representation

Basic types for PHP like Enums, LocalDate etc

Awesome Lists containing this project

README

        

[![Code Coverage](https://scrutinizer-ci.com/g/PeekAndPoke/php-types/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/PeekAndPoke/php-types/?branch=master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/PeekAndPoke/php-types/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/PeekAndPoke/php-types/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/PeekAndPoke/php-types/badges/build.png?b=master)](https://scrutinizer-ci.com/g/PeekAndPoke/php-types/build-status/master)

# Why PHP-Types

There are some types that PHP does not provide as part of the language, e.g.:

- Enums

- LocalDate (a date object that enforces creation WITH timezone)

# TODO

( ) LocalDate::isSameDay

( ) LocalDate::isSameWeek

( ) LocalDate::isSameMonth

( ) LocalDate::isSameYear

( ) LocalDate::isSameDecade

( ) LocalDate::isSameCentury

( ) LocalDate::isSameMillennium

( ) extract all DST (daylight saving time aware methods from LocalDate)

$date->dst()->getShift()
$date->dst()->modifyByDays()
...