Giter Site home page Giter Site logo

javanese-weton's Introduction

Packagist Downloads (custom server) GitHub GitHub repo size

๐Ÿ”ญ About Javanese Weton

Calculate and output the Javanese Weton from regular date. This package can handle conversions from January 1, 1900 onwards

๐Ÿ’ป Installation

You may use composer to install javanese-weton into your project:

composer require irsyadulibad/weton

๐Ÿ›ฉ๏ธ Usage

โœจ Getting Started

First, you need pass a DateTime to convert it into weton:

$date = new DateTime('2022-04-15');
$weton = new Weton($date);

Or, you can use static style instead

$date = new DateTime('2022-04-15');
$weton = Weton::from($date);

๐Ÿ“– Docs

  • Get weton's day an it's neptu value
// Weton's day name | ex: Friday
$weton->day->name;

// Weton's day neptu | ex: 6
$weton->day->neptu;

// Both day and neptu as object
// ex: name => Friday, neptu => 6
$weton->day;
  • Get weton's pasaran and it's neptu value
// Weton's pasaran name | ex: Kliwon
$weton->pasaran->name;

// Weton's pasaran neptu | ex: 8
$weton->pasaran->neptu;

// Both day and neptu as object
// ex: name => Kliwon, neptu => 8
$weton->pasaran;
  • Get total neptu
$weton->totalNeptu;
  • Format to indonesian
    You can change output to indonesian format using toIndonesian() method
$weton->toIndonesian();
  • Output as string
    You can directly output the object as string, it will return pasaran and day name
// ex: Legi Friday
echo $weton;

// if indonesian, it will be `Jum'at Legi`
echo $weton->toIndonesian();

๐Ÿ“„ Credits

Github: [https://github.com/irsyadulibad]
Website: [http://irsyadulibad.my.id]
Facebook: [https://facebook.com/irsyadulibad.dev]

javanese-weton's People

Contributors

irsyadulibad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

burhansyam

javanese-weton's Issues

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.