|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 7 | + <title>strftime to Go Date Format Converter</title> |
| 8 | + <meta name="description" content="Simple strftime to Go Date Format Converter"> |
| 9 | + <link rel="stylesheet" href="styles.css"> |
| 10 | +</head> |
| 11 | +<body> |
| 12 | + <header class="header"> |
| 13 | + <h1 class="header__title">Go Date Format</h1> |
| 14 | + <h2 class="header__subtitle">Because I've used <code class="header__title-code">strftime</code> a million times before</h2> |
| 15 | + </header> |
| 16 | + |
| 17 | + <div class="content"> |
| 18 | + <div id="converter" class="converter pure-g"> |
| 19 | + <div class="converter__field pure-u-1-1 pure-u-md-11-24"> |
| 20 | + <input id="strftime" class="converter__field-input" type="text" aria-label="Input strftime string" value="%B %e, %Y"/> |
| 21 | + </div> |
| 22 | + <div id="arrow" class="converter__arrow pure-u-1-1 pure-u-md-2-24">→</div> |
| 23 | + <div class="converter__field pure-u-1-1 pure-u-md-11-24"> |
| 24 | + <input id="output" class="converter__field-input" type="text" aria-label="Go format string" readonly value=""/> |
| 25 | + </div> |
| 26 | + </div> |
| 27 | + |
| 28 | + <div id="definitions" class="definitions pure-g"> |
| 29 | + <div class="definition__box pure-u-1-1 pure-u-md-12-24"> |
| 30 | + <dl class="definition__list"> |
| 31 | + <dt class="definition__name">%a</dt> |
| 32 | + <dd class="definition__description pure-u-16-24">The abbreviated weekday name ("Sun")</dd> |
| 33 | + <dt class="definition__name">%A</dt> |
| 34 | + <dd class="definition__description pure-u-16-24">The full weekday name ("Sunday")</dd> |
| 35 | + <dt class="definition__name">%b</dt> |
| 36 | + <dd class="definition__description pure-u-16-24">The abbreviated month name ("Jan")</dd> |
| 37 | + <dt class="definition__name">%B</dt> |
| 38 | + <dd class="definition__description pure-u-16-24">The full month name ("January")</dd> |
| 39 | + <dt class="definition__name">%d</dt> |
| 40 | + <dd class="definition__description pure-u-16-24">Day of the month (01..31)</dd> |
| 41 | + <dt class="definition__name">%e</dt> |
| 42 | + <dd class="definition__description pure-u-16-24">Day of the month with a leading blank instead of zero (1..31)</dd> |
| 43 | + <dt class="definition__name">%m</dt> |
| 44 | + <dd class="definition__description pure-u-16-24">Month of the year (01..12)</dd> |
| 45 | + <dt class="definition__name">%y</dt> |
| 46 | + <dd class="definition__description pure-u-16-24">Year without a century (00..99)</dd> |
| 47 | + <dt class="definition__name">%Y</dt> |
| 48 | + <dd class="definition__description pure-u-16-24">Year with century</dd> |
| 49 | + </dl> |
| 50 | + </div> |
| 51 | + <div class="definition__box pure-u-1-1 pure-u-md-12-24"> |
| 52 | + <dl class="definition__list"> |
| 53 | + <dt class="definition__name">%H</dt> |
| 54 | + <dd class="definition__description pure-u-16-24">Hour of the day, 24-hour clock (00..23)</dd> |
| 55 | + <dt class="definition__name">%I</dt> |
| 56 | + <dd class="definition__description pure-u-16-24">Hour of the day, 12-hour clock (01..12)</dd> |
| 57 | + <dt class="definition__name">%l</dt> |
| 58 | + <dd class="definition__description pure-u-16-24">Hour of the day, 12-hour clock without a leading zero (1..12)</dd> |
| 59 | + <dt class="definition__name">%M</dt> |
| 60 | + <dd class="definition__description pure-u-16-24">Minute of the hour (00..59)</dd> |
| 61 | + <dt class="definition__name">%P</dt> |
| 62 | + <dd class="definition__description pure-u-16-24">Meridian indicator ("am" or "pm")</dd> |
| 63 | + <dt class="definition__name">%p</dt> |
| 64 | + <dd class="definition__description pure-u-16-24">Meridian indicator ("AM" or "PM")</dd> |
| 65 | + <dt class="definition__name">%S</dt> |
| 66 | + <dd class="definition__description pure-u-16-24">Second of the minute (00..60)</dd> |
| 67 | + <dt class="definition__name">%z</dt> |
| 68 | + <dd class="definition__description pure-u-16-24">Time zone hour and minute offset from UTC</dd> |
| 69 | + <dt class="definition__name">%Z</dt> |
| 70 | + <dd class="definition__description pure-u-16-24">Time zone name</dd> |
| 71 | + <dt class="definition__name">%%</dt> |
| 72 | + <dd class="definition__description pure-u-16-24">Literal "%" character</dd> |
| 73 | + </dl> |
| 74 | + </div> |
| 75 | + </div> |
| 76 | + |
| 77 | + <div id="unsupported" class="unsupported pure-g"> |
| 78 | + <h4 class="unsupported__title pure-u-1-1">Codes not natively supported in Go</h4> |
| 79 | + <div class="pure-u-1-1 pure-u-md-12-24"> |
| 80 | + <dl class="unsupported__list"> |
| 81 | + <dt class="unsupported__name">%j</dt> |
| 82 | + <dd class="unsupported__description pure-u-16-24">Day of the year (001..366)<br>use <a href="https://godoc.org/time#Time.YearDay">YearDay()</a> instead</dd> |
| 83 | + <dt class="unsupported__name">%U</dt> |
| 84 | + <dd class="unsupported__description pure-u-16-24">Week number of the current year, starting with the first Sunday as the first day of the first week (00..53)</dd> |
| 85 | + <dt class="unsupported__name">%W</dt> |
| 86 | + <dd class="unsupported__description pure-u-16-24">Week number of the current year, starting with the first Monday as the first day of the first week (00..53)<br>use <a href="https://godoc.org/time#Time.ISOWeek">ISOWeek()</a> instead</dd> |
| 87 | + <dt class="unsupported__name">%w</dt> |
| 88 | + <dd class="unsupported__description pure-u-16-24">Day of the week (Sunday is 0, 0..6)<br>use <a href="https://godoc.org/time#Time.Weekday">Weekday()</a> instead</dd> |
| 89 | + </dl> |
| 90 | + </div> |
| 91 | + <div class="pure-u-1-1 pure-u-md-12-24"> |
| 92 | + <dl class="unsupported__list"> |
| 93 | + <dt class="unsupported__name">%X</dt> |
| 94 | + <dd class="unsupported-definition__description pure-u-16-24">Preferred representation for the time alone, no date</dd> |
| 95 | + <dt class="unsupported-definition__name">%x</dt> |
| 96 | + <dd class="unsupported-definition__description pure-u-16-24">Preferred representation for the date alone, no time</dd> |
| 97 | + <dt class="unsupported-definition__name">%c</dt> |
| 98 | + <dd class="unsupported-definition__description pure-u-16-24">The preferred local date and time representation</dd> |
| 99 | + </dl> |
| 100 | + </div> |
| 101 | + </div> |
| 102 | + </div> |
| 103 | + |
| 104 | + <footer class="footer"> |
| 105 | + <p class="footer__copyright">© 2019 GoDateTime.com</p> |
| 106 | + <p class="footer__notice">This is polite version of <a href="" target="_blank" rel="license noopener">another similar repository</a>. <span>Code licensed under <a href="https://github.com/Vimux/godatetime/blob/master/LICENSE" target="_blank" rel="license noopener">MIT</a>.</span></p> |
| 107 | + </footer> |
| 108 | +<script src="main.js"></script> |
| 109 | +</body> |
| 110 | +</html> |
0 commit comments