Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

2012-06-18から1日間の記事一覧

書籍 Ruby Cookbook | 日付のイテレーション

パンくず Ruby Cookbook 日付のイテレーション 概要 日付のイテレーション サンプル # encoding: Windows-31J require 'date' today = Date.today ten_date_after = today + 10 now = Time.now puts today puts ten_date_after puts now puts "-------------…

書籍 Ruby Cookbook | 日付のフォーマット

パンくず Ruby Cookbook 日付のフォーマット 概要 日付のフォーマット フォーマット表 フォーマット用文字 内容 %A English day of the week %a Abbreviated English day of the week %B English month of the year %b English month of the year %C The cen…

書籍 Ruby Cookbook | 現在日時の取得

パンくず Ruby Cookbook 現在日時の取得 概要 現在日時の取得 サンプル now_date_time=DateTime.now now_time=Time.now now_date=Date.today puts now_date_time.to_s puts now_time.to_s puts now_date.to_s 出力 2012-06-19T00:41:31+09:00 2012-06-19 00:…