idf/nova-worldclock-card

该软件包已被废弃,不再维护。作者建议使用 interaction-design-foundation/nova-worldclock-card 软件包。

Laravel Nova 卡片,用于显示世界时钟

3.2.1 2024-05-29 12:33 UTC

This package is auto-updated.

Last update: 2024-08-05 16:29:55 UTC


README

World Clock Laravel Nova Card

Laravel Nova 卡片,用于显示世界时钟。

Latest Stable Version Total Downloads

安装

您可以通过 composer 在使用 Nova 的 Laravel 应用中安装此软件包

composer require interaction-design-foundation/nova-worldclock-card

使用方法

注册您的卡片.

基本使用

use InteractionDesignFoundation\WorldClockCard\WorldClock;

public function cards()
{
  return [
     (new WorldClock())
        ->timezones([
            'Asia/Dubai',
            'America/New_York',
            'Europe/Kiev',
        ]),
  ];
}

高级使用

use InteractionDesignFoundation\WorldClockCard\WorldClock;

public function cards()
{
  return [
     (new WorldClock())
        ->timezones([
            'Asia/Dubai',
            'America/New_York',
            'Europe/Kiev',
        ])
        ->timeFormat('h:i') // Optional, time format. Default is: 'h:i'
        ->updatePeriod(1000) // Optional, to set updating time period in millisecond.
        ->nightRange(22, 6) // Optional, to set range of night hours. Default is [19; 6).
        ->hideContinents() // Optional, hide continents from timezone-names.
        ->timezoneDescriptions([ // Optional, add text description to timezones.
            'Asia/Dubai' => 'Yuto, Hana',
            'America/New_York' => 'Mark',
            'Europe/Kiev' => 'Slava, Ukraine',
        ]),
  ];
}

变更日志

请参阅 发布版 了解最近更改的详细信息。

贡献

请参阅 贡献指南 了解详情。

许可证

MIT 许可证 (MIT)。请参阅 许可证文件 了解更多信息。