定制 duiliopastorelli/get-month 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

duiliopastorelli/get-month

Composer 安装命令:

composer require duiliopastorelli/get-month

包简介

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

README 文档

README

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

Installation via Composer

$ composer require duiliopastorelli/get-Month

Usage with Composer

You can call the class with:

<?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:

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

echo \DuilioPastorelli\Month::getMonth();

See Usage section for more options.

##Installation "Quick And Dirty" Copy the "Month.php" file inside your project.

Include it:

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

echo Month::getMonth();

See Usage section for more options.

##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:

  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

###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);

统计信息

  • 总下载量: 28
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固