タグ

dateに関するudzuraのブックマーク (7)

  • RubyのDateTimeとTimeはどちらを使うべきか - yarbの日記

    TimeはもともとPOSIXのtime_t型のラッパーで、内部的には1970年1月1日を起点とする秒数を保持している。 WikipediaによるUnix timeの記述を見ると、time_tは、なんと初期のUnixでは32ビット整数であったものの、60Hzのクロックに同期してカウントアップしていたそうだ。1秒間に60カウント進む。これでは2年半しか表現できない。のちに1Hz、つまり1秒1カウントで進むように変更され、これで前後130年の時刻を表現できるようになったそうな。 よく知られる2038年問題は32ビットの符号付き整数で表現できる1970年1月1日を起点とした場合の上限が2038年1月19日の午前3時14分7秒であるという話。 RubyのTimeクラスも、この制限を受けていた。 「受けていた」というのは、Ruby 1.9.2や、1.9系の新機能を1.8系へバックポートした1.8.7以

    RubyのDateTimeとTimeはどちらを使うべきか - yarbの日記
    udzura
    udzura 2012/10/01
    一方、レイルザーはActiveSupport::TimeWithZone を使ったとさ…… / Timeクラスはタイムゾーン指定がlocalかutcしかないというのが辛いことがあるが、でも DateTime#+ の挙動は直感的じゃない感じもする。
  • New community features for Google Chat and an update on Currents

    Join the official community for Google Workspace administrators In the Google Cloud Community, connect with Googlers and other Google Workspace admins like yourself. Participate in product discussions, check out the Community Articles, and learn tips and tricks that will make your work and life easier. Be the first to know what's happening with Google Workspace. ______________ Learn about more Goo

    New community features for Google Chat and an update on Currents
    udzura
    udzura 2012/06/25
    何やら奥が深い話し……
  • 日時をフォーマットする(GroovyのDateクラス版) - みちしるべ

    日時をフォーマットするで一度やったのだが、 JavaSimpleFormatクラスで全然groovyっぽくなかった。 groovyのDateクラスのフォーマットを使えばできると id:wandersonsantosからコメントをもらったのでやり直し。 http://groovy.codehaus.org/groovy-jdk/java/util/Date.html ソース new Date().format("yyyy/MM/dd(E)") new Date().format("h:mm a") new Date().format("EEE, MMM d, ''yy") new Date().format("EEE, d MMM yyyy HH:mm:ss Z") new Date().format("yyyy-MM-dd'T'HH:mm:ss.SSSZ") new Date().for

    日時をフォーマットする(GroovyのDateクラス版) - みちしるべ
    udzura
    udzura 2011/11/01
    これだああああああうわああああああ
  • 日付の表記に関するノート

    日付の表記方法は、文化的な背景の違い、また用途の違いによって様々なフォーマットがあります。多くの場合、特に断り無く使っても問題なく正しい日時を伝えることができますが、文脈や利用者の環境によっては、意外な落とし穴にはまることもあります。誤解なく、かつ効率的に処理しやすい日時表記方法としては、2001-08-02T10:35Zというスタイルの、ISO/W3Cフォーマットがあります。 文化と日付表記 日時表記の国際標準とW3Cノート W3Cの日時フォーマット XML Schemaの日時データ型 タイムスタンプのインターネット標準 そのほか広く用いられる日時の書式 ピリオド区切りによる日付 電子メール、HTTPヘッダなどの日時表記 継続期間の表記 ISO 8601の期間表記 Dublin Coreの期間表記 読みやすさと処理しやすさのバランス 参照文献 文化と日付表記 よく見かける日付の表記法とし

  • GitHub - elm200/date_helper_ja: DateHelperJa plugin allows you to show Japanese-style dates on the Ruby on Rails applications.

    = DateHelperJa プラグイン == DateHelperJa とは ActionView::Helpers::DateHelper を日語化する。 DateFormJa をプラグインとしてインストールするだけで、datetime_select,date_selectが日語表示される。 == インストール % ./script/plugin install git://github.com/elm200/date_helper_ja.git == 使用例 datetime_select("model", "attr") # =>"2009年 4月 29日 13時 14分" オリジナルの振る舞いに戻したいときは、:use_jp_xxx (xxx = year, month, day, hour, minute, second) というオプションを false に設定する。 da

    GitHub - elm200/date_helper_ja: DateHelperJa plugin allows you to show Japanese-style dates on the Ruby on Rails applications.
  • date_selectとかdatetime_selectとかのオプション - zenpouの日記

    例:<%= datetime_select 'hoge', 'hage',{:discard_hour => true, :use_month_numbers => true } %> :order => [:day,:month,:year ] # 選択する項目の順番を入れ替える :discard_year => true # 年のセレクトボックスを削除する。 :discard_month => true # 月以降のセレクトボックスを削除する。(日も削除される) :discard_day => true # 日のセレクトボックスを削除する。 :discard_hour => true # 時間のセレクトボックスを削除する(分も削除する) :discard_minitu => true # 分のセレクトボックスを削除する。 :include_seconds => true # 秒も含める

    date_selectとかdatetime_selectとかのオプション - zenpouの日記
    udzura
    udzura 2009/07/16
    べんり
  • Public Holidays of Japan

    ● <トップ頁へ>・<総合目次へ>・<前頁へ>・<次頁へ> 日の祝日 (情報) インフォマット(INFOMAT) この頁の情報量:27KB (2008.10.03現在) 更新日:2008.10.03 日の祝日 Public Holidays of Japan 平成20年度(2008) インフォマット日の祝日 ● (Infomat Public Holidays of Japan 2008) ■元日(Ganjitsu) New Year's Day 0101(火) ■成人の日(Seijin-no-hi)Coming-of-Age Day 0114(月) ■建国記念の日(Kenkoku Kinen-no-hi)National Founding Day 0211(月) ■春分の日(Shunbun-no-hi)Vernal Equinox Day 0320(木) ■昭和の日(Showa

  • 1