タグ

JavaScriptとdatetimeに関するnilabのブックマーク (3)

  • おすすめライブラリつまみ食い | 第1回 Moment.js

    Dateの日時処理は面倒なことも プログラムでは日付や時間のデータを取り扱うことは頻繁に行います。JavaScriptではDateを使うことで日付や時間のデータを扱うことができます。Dateは次のように使います*。 var d = new Date('2012/10/20 15:30:50'); // 年を参照する d.getFullYear(); //結果は 2012 // 月を参照する(0から始まる) d.getMonth(); //結果は 9 // 日を参照する d.getDate(); //結果は 20 *注:Dateでの日時情報の取得 この他にもさまざまなメソッドで日時の情報を取得できるので、詳しくはドキュメントを参照してください。 Date - JavaScript | MDN このようにDateを使うと日時のデータを扱うことができるのですが、Dateでは面倒なことがいくつかあ

    おすすめライブラリつまみ食い | 第1回 Moment.js
    nilab
    nilab 2015/05/07
    おすすめライブラリつまみ食い - Moment.js | CodeGrid
  • Moment.js | Docs

    Moment can be used in browsers and in Node.js. Moment is a legacy project in maintenance mode. See the latest Project Status update for the current maintenance policy. This site loads Moment as the global moment, so browser-oriented examples can be tried in your browser's developer console. Examples that use Node.js, module loaders, or other setup must be run in the corresponding environment. npm

    nilab
    nilab 2015/05/07
    Moment.js | Docs
  • date-utils

    Date-Utils: Polyfills for the Date object NOTE Version 2 Feature and Changes discussion is being held at https://github.com/JerrySievert/node-date-utils/issues/37 In a nutshell Micro-Framework adding missing functionality to the Date object Useable as a polyfill in the browser Useable as a polyfill in Node.js Works in CouchDB Using within a Browser <script type="text/javascript" src="date-utils.mi

    date-utils
    nilab
    nilab 2015/05/07
    date-utils : "Date add-ons for Node.js"
  • 1