tourze/gb-t-7408

0.0.1 2025-05-29 10:23 UTC

This package is auto-updated.

Last update: 2025-06-03 06:57:18 UTC


README

English | 中文

License

GB/T 7408 Data elements and interchange formats - Information interchange - Representation of dates and times

Features

  • Provides an Enum Weekday that follows the GB/T 7408 standard
  • Supports retrieving all weekday options, labels, and values
  • Easy integration with date and time related systems

Installation

  • Requires PHP 8.1 or above
  • Depends on tourze/enum-extra package
composer require tourze/gb-t-7408

Quick Start

use Tourze\GBT7408\Weekday;

// Get all weekday options
$weekdays = Weekday::items();

// Get the label of a weekday
echo Weekday::Monday->getLabel(); // Output: "星期一"

// Get the value of a weekday
echo Weekday::Monday->value; // Output: "01"

Documentation

Contributing

  • Issues and PRs are welcome
  • Please follow PSR standards and existing code style

License

  • MIT License
  • Author: tourze

Changelog

  • See [CHANGELOG.md] if available