çµè«
- æ±ããã¼ã¿ãæ¥ä» (date) ãªãã
registered_on
ã®ããã«suffixã«ã¯on
ã使ãã¹ã - æ±ããã¼ã¿ãæ¥æ (datetime) ãªãã
registered_at
ã®ããã«suffixã«ã¯at
ã使ãã¹ã
èæ¯
ããã¾ã§ãã¼ã¿ãã¼ã¹ã®ã«ã©ã åãå½åããéãæ¥ä» (date) ã§ãæ¥æ (datetime) ã§ãsuffixã«ã¯ at
ã使ã£ã¦ããã
ã ãå
æ¥ãè±èªçã«ã¯æ¥ä»ã¨æéã§æ確ã«ä½¿ãåãããã£ã¦æ¥ä»ã®å ´å㯠at
ããã on
ã®ã»ããé©åã§ãããã¨æãã¦ããã£ãã
端çã«ã¾ã¨ããã¨ã at
ã¯ç¹ã示ãåç½®è©ãªã®ã§æéãå³å¯ã«è¡¨ãå ´åã«é©åã on
ã¯ææ¥ãæ¥ãªã©ï¼æéã«æ¯ã¹ã¦ï¼å¹
ã®ãããã®ã表ãå ´åã«é©åãã¨ãããã¨ãããã
ã³ã¼ãã£ã³ã°è¦ç´çã«ã¯ã©ããªã®ã
çå±ã¨ãã¦ã¯ç解ã§ããããããã¾ã§èãããã¨ããªã使ãåãã ã£ãããå¾ãã¹ããã©ããã¯è¿·ã£ãããã®ãããå ã®ä½¿ãåããè¯å®ãã¦ããã³ã¼ãã£ã³ã°è¦ç´çãããã°ãããã¹ãæ ¹æ ãå¢ãã¦å¾ããããã®ã§èª¿ã¹ãã
軽ã調ã¹ãéãã§ã¯æ¬ä»¶ã«ã¤ãã¦æ確ã«å®ç¾©ãã¦ããã«ã¼ã«ã¯ãã¾ããªãã£ãããThoughtbot社ã®Railsã¹ã¿ã¤ã«ã¬ã¤ãã«ã¯ä¸è¨ã®ãããªè¨è¿°ããã£ãã
Name date columns with _on suffixes. Name datetime columns with _at suffixes.
ä»å¾
èªåã¨ãã¦ã¯ä½¿ãåãã®çå±ã«ã¯ç°è«ãªãã®ã§dateã«ã©ã ãªãonããdatetimeã«ã©ã ãªãatãsuffixã¨ãã¦ä½¿ã£ã¦ãããã¨ã«ããã