Giter Club home page Giter Club logo

chhankitek's Introduction

Chhankitek for Laravel

Convert from AD (Anno Domini) to Lunar (Chhankitek) format see more.

Installation

You can install the package via composer:

composer require asorasoft/chhankitek

Usage

// In Laravel controller, use this trait
use HasChhankitek;

// start call chhankitek method
$toLunarDate = $this->chhankiteck(Carbon::now());
$toLunarDate->toString(); // ថ្ងៃច័ន្ទ ៤ រោច ខែបឋមាសាឍ ឆ្នាំឆ្លូវ ត្រីស័ក ពុទ្ធសករាជ ២៥៦៥

Available methods

// In Laravel controller, use this trait
use HasChhankitek;

$toLunarDate = $this->chhankiteck(Carbon::now());

$toLunarDate->getDayOfWeek(); // អាទិត្យ, ច័ន្ទ...
$toLunarDate->getLunarDay(); // ១កើត, ២កើត...
$toLunarDate->getLunarMonth(); // ចេត្រ...
$toLunarDate->getLunarZodiac(); // ជូត, ឆ្លូវ...
$toLunarDate->getLunarEra(); // ត្រីស័ក...
$toLunarDate->getLunarYear(); // ២៥៦៥, ២៥៦៦..

Or we can use toLunarDate helper function.

toLunarDate(Carbon::now())->toString(); // ថ្ងៃច័ន្ទ ៤ រោច ខែបឋមាសាឍ ឆ្នាំឆ្លូវ ត្រីស័ក ពុទ្ធសករាជ ២៥៦៥

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Support

If you like this package and want to support me, you can buy me a coffee ☕

Credits

License

The MIT License (MIT). Please see License File for more information.

Authors and acknowledgment

This library might not exist without hardwork of these people:

  1. Base on algorithm of Mr.Phylypo Tum from Cam-CC
  2. Porting from momentkh by ThyrithSor into Java
  3. Khmer New Year Time Calculation
  4. Porting from MetheaX/khmer-chhankitek-calendar by MetheaX into Laravel Package

chhankitek's People

Contributors

helmab avatar wp-mab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chhankitek's Issues

illuminate/support issue

Problem 1
    - Root composer.json requires asorasoft/chhankitek ^1.0 -> satisfiable by asorasoft/chhankitek[1.0.3, 1.0.4].
    - asorasoft/chhankitek[1.0.3, ..., 1.0.4] require illuminate/support ^4.2|^5.8|^6.0|^7.0|^8.0 -> found illuminate/support[v4.2.0-BETA1, ..., 4.2.x-dev, v5.8.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require asorasoft/chhankitek:*" to figure out if any version is installable, or "composer require asorasoft/chhankitek:^2.1" if you know which you need.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.