タイムゾーンを指定して時刻文字列を取得する Date クラスの下記のメソッドは、第 2 引数のオプションオブジェクトで、timeZone プロパティを指定できるようになっています (メソッド名は toLocalXxx ではなく、toLocaleXxx であることに注意してください)。 Date#toLocaleString メソッド: 日付+時刻 Date#toLocaleDateString メソッド: 日付のみ Date#toLocaleTimeString メソッド: 時刻のみ 下記の例では、ユーザ環境、ロンドン、米国ニューヨークのローカルタイムを出力しています。 ユーザ環境、ロンドン、ニューヨークの現地時刻を出力する var date = new Date(); console.log(date.toLocaleString()); console.log(date.toLocal
EAT東京で作成した、 外国人旅行者の皆様に 分かりやすいメニュー例と、 作り方のコツをご紹介します。 メニュー例を見る
5/3 17:45追記:t_komuraさんに指摘いただいた関数と、さらに僕が調べ直したものを含め、「ロケール設定に従う関数一覧」に25個ほど追加しました。かなり見落としがありましたね…。 PHPのロケール*1まわりについて調査したので、これをまとめてみます。 この記事は「ロケールの影響を受ける関数 - Sarabande.jp」を掘り下げたものです。masakielasticさん、ナイスな記事をありがとうございます。 PHPの文字列型と文字エンコーディング 他のモダンなLL言語と異なり、PHPは文字列の文字エンコーディングに関して何も仮定せず、単なるバイト列として管理しています。つまり、文字エンコーディングの取り扱いは各関数の実装に委ねられています。 下記の通り、これはマニュアルにも記述があるのですが、実に残念なことです。 残念ながら、PHP の各関数が文字列のエンコーディングを判断する
Install bower install moment-timezone --save # bower npm install moment-timezone --save # npm yarn add moment-timezone # Yarn Format Dates in Any Timezone var jun = moment("2014-06-01T12:00:00Z"); var dec = moment("2014-12-01T12:00:00Z"); jun.tz('America/Los_Angeles').format('ha z'); // 5am PDT dec.tz('America/Los_Angeles').format('ha z'); // 4am PST jun.tz('America/New_York').format('ha z'); // 8
Moment.js 2.30.1 Parse, validate, manipulate, and display dates and times in JavaScript. Install npm install moment --save # npm yarn add moment # Yarn Install-Package Moment.js # NuGet spm install moment --save # spm meteor add momentjs:moment # meteor bower install moment --save # bower (deprecated) Format Dates moment().format('MMMM Do YYYY, h:mm:ss a'); moment().format('dddd'); moment().format
Numeral.js A javascript library for formatting and manipulating numbers. Use it In the Browser <script src="numeral.min.js"></script> or include from cdnjs.com <script src="//cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script> In Node.js npm install numeral var numeral = require('numeral'); Create Create an instance of a numeral. Numeral takes numbers or strings that it trys
Some of the companies and organizations that use CLDR are: Apple (macOS, iOS, watchOS, tvOS, and several applications; Apple Mobile Device Support and iTunes for Windows; …) Google (Web Search, Chrome, Android, Adwords, Google+, Google Maps, Blogger, Google Analytics, …) IBM (DB2, Lotus, Websphere, Tivoli, Rational, AIX, i/OS, z/OS, …) Meta (Facebook, Messenger, WhatsApp, …) Microsoft (Windows, Of
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く