2017 © Pedro Peláez
 

library get-month

image

duiliopastorelli/get-month

  • Saturday, March 31, 2018
  • by duiliopastorelli
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

getMonth

Simple class to get a month in different formats and languages., (*1)

Installation via Composer

$ composer require duiliopastorelli/get-Month

Usage with Composer

You can call the class with:, (*2)

<?php
require "vendor/autoload.php";

use DuilioPastorelli\Month;

echo Month::getMonth();

Or if you don't want to add the "use DuilioPastorelli\Month" at the top, you can:, (*3)

<?php
require "vendor/autoload.php";

echo \DuilioPastorelli\Month::getMonth();

See Usage section for more options., (*4)

Installation "Quick And Dirty"

Copy the "Month.php" file inside your project., (*5)

Include it:, (*6)

<?php
include "[PATH]/month.php";

echo Month::getMonth();

See Usage section for more options., (*7)

Usage

Get the month in a numeric format (1->12):

Month::getMonth();

Get the current month translated in a particular language:

Month::getMonth("[LANGUAGE]");

Available languages are:, (*8)

  1. Italian -> it
  2. German -> de

Get the next and previous month (Time Machine) in a numeric format:

Month::getMonth(null, 1);
Month::getMonth(null, -1);

Supported values for the Time Machine are 1->11 and -1->-11, (*9)

Get a particular month (3 that means March) in a numeric format:

Month::getMonth(null, null, 3);

Other examples

  • Get the next month in German:
Month::getMonth("de", 1);
  • Get a particular German month (April):
Month::getMonth("de", null, 4);

The Versions

31/03 2018

v1.0.0

1.0.0.0

  Sources   Download

29/05 2016

dev-master

9999999-dev

Simple class to get a month in different formats and languages.

  Sources   Download

MIT

by Avatar duiliopastorelli

29/05 2016

1.0.8

1.0.8.0

Simple class to get a month in different formats and languages.

  Sources   Download

MIT

by Avatar duiliopastorelli

29/05 2016

1.0.7

1.0.7.0

Simple class to get a month in different formats and languages.

  Sources   Download

MIT

by Avatar duiliopastorelli

29/05 2016

1.0.6

1.0.6.0

Simple class to get a month in different formats and languages.

  Sources   Download

MIT

by Avatar duiliopastorelli

29/05 2016

1.0.5

1.0.5.0

Simple class to get a month in different formats and languages.

  Sources   Download

MIT

by Avatar duiliopastorelli

29/05 2016

dev-develop

dev-develop

Simple class to get a month in different formats and languages.

  Sources   Download

MIT

by Avatar duiliopastorelli

29/05 2016

1.0.3

1.0.3.0

Simple class to get a month in different formats and languages.

  Sources   Download

MIT

by Avatar duiliopastorelli

29/05 2016

v1.0.2

1.0.2.0 https://github.com/duiliopastorelli/getMonth

Class to get a Month in different formats and languages.

  Sources   Download

MIT

The Requires

  • php >=5.3.0