bigfishtv/partial-date 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

bigfishtv/partial-date

最新稳定版本:2.1.0

Composer 安装命令:

composer require bigfishtv/partial-date

包简介

A simple date parser and formatter for dealing with partial dates.

README 文档

README

Latest Stable Version Build Status

Partial Date

A simple PHP date parser and formatter for dealing with partial dates. This is handy when you want to store a year or year/month in MySQL date format without specifying a month or day.

<?php

use Bigfish\PartialDate;

// from Australian date format to SQL
$date = new PartialDate('2/2015');
echo $date->toSQLFormat(); // outputs 2015-02-00

// from SQL date format to Australian
$date = new PartialDate('2015-02-00');
echo $date->toAusFormat(); // outputs 02/2015

// parse method
$data = new PartialDate();
$date->parse('12/12/14');

// setDate method
$data = new PartialDate();
$date->setDate(2015, 2, 3);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-03-09