matejkucera/czech-carbon

Very small extension of Carbon, used for simple displaying of czech 'fine dates'.

1.0.2 2020-01-13 12:50 UTC

This package is not auto-updated.

Last update: 2021-11-01 21:40:07 UTC


README

Description

CzechCarbon is very small extension of Carbon, used for printing fine czech dates.

Build & coverage status

build status coverage status

Installation

Composer:

composer require matejkucera/czech-carbon

Examples

$now = CzechCarbon::now();

echo $date->toFineDate();
// outputs "24.7.2018"

echo $date->toFineDateTime();
// outputs "24.7.2018 22:17"

echo $now->toFineDate(true);
// outputs "dnes"

echo $now->toFineDateTime(true);
// outputs "dnes 22:17"

$now->subday();

echo $now->toFineDate(true);
// outputs "včera"

echo $now->toFineDateTime(true);
// outputs "včera 22:17"

Contact

If you would like to get in touch with me, send me an email to matej.kucera@vse.cz