ko.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //! moment.js locale configuration
  2. //! locale : Korean [ko]
  3. //! author : Kyungwook, Park : https://github.com/kyungw00k
  4. //! author : Jeeeyul Lee <jeeeyul@gmail.com>
  5. ;(function (global, factory) {
  6. typeof exports === 'object' && typeof module !== 'undefined'
  7. && typeof require === 'function' ? factory(require('../moment')) :
  8. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  9. factory(global.moment)
  10. }(this, (function (moment) { 'use strict';
  11. //! moment.js locale configuration
  12. var ko = moment.defineLocale('ko', {
  13. months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
  14. monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
  15. '_'
  16. ),
  17. weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
  18. weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
  19. weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
  20. longDateFormat: {
  21. LT: 'A h:mm',
  22. LTS: 'A h:mm:ss',
  23. L: 'YYYY.MM.DD.',
  24. LL: 'YYYY년 MMMM D일',
  25. LLL: 'YYYY년 MMMM D일 A h:mm',
  26. LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
  27. l: 'YYYY.MM.DD.',
  28. ll: 'YYYY년 MMMM D일',
  29. lll: 'YYYY년 MMMM D일 A h:mm',
  30. llll: 'YYYY년 MMMM D일 dddd A h:mm',
  31. },
  32. calendar: {
  33. sameDay: '오늘 LT',
  34. nextDay: '내일 LT',
  35. nextWeek: 'dddd LT',
  36. lastDay: '어제 LT',
  37. lastWeek: '지난주 dddd LT',
  38. sameElse: 'L',
  39. },
  40. relativeTime: {
  41. future: '%s 후',
  42. past: '%s 전',
  43. s: '몇 초',
  44. ss: '%d초',
  45. m: '1분',
  46. mm: '%d분',
  47. h: '한 시간',
  48. hh: '%d시간',
  49. d: '하루',
  50. dd: '%d일',
  51. M: '한 달',
  52. MM: '%d달',
  53. y: '일 년',
  54. yy: '%d년',
  55. },
  56. dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
  57. ordinal: function (number, period) {
  58. switch (period) {
  59. case 'd':
  60. case 'D':
  61. case 'DDD':
  62. return number + '일';
  63. case 'M':
  64. return number + '월';
  65. case 'w':
  66. case 'W':
  67. return number + '주';
  68. default:
  69. return number;
  70. }
  71. },
  72. meridiemParse: /오전|오후/,
  73. isPM: function (token) {
  74. return token === '오후';
  75. },
  76. meridiem: function (hour, minute, isUpper) {
  77. return hour < 12 ? '오전' : '오후';
  78. },
  79. });
  80. return ko;
  81. })));