Go Time an Online Golang Date Format Tool


本文摘自网络,作者,侵删。


title: "Go Time an Online Golang Date Format Tool"
date: 2021-01-26T21:27:06+08:00
draft: true
tags: ['go']
author: "dadigang"
author_cn: "大地缸"
personal: "http://www.real007.cn"


关于作者

http://www.real007.cn/about

Go Time - An online Golang date format tool

Oct 16, 2015

Go Time - an online Golang date format tool

I’m often frustrated by Go’s syntax for date-time parsing. The docs explain the concept: you write the reference date (January 2nd, 2006 at 3:04:05PM in the MST time zone) in the format you want to parse or print. They provide a few examples, but the only complete list of format parts is in the time package codebase. It’s not really user-friendly.

To make things easier, I wrote a quick webapp that parses Go date-time formats and explains the components. The page also includes a complete list of all the different formats for each part of the string, with explanation. Try it here.

Technologically, there’s no Go involved in this project - the page uses a line-for-line Javascript reimplementation of the Go format-string parser to produce the explanations. The list of symbols and explanations were also taken directly from format.go. In the future I’m planning to port the parser responsible for applying the patterns, so we can have in-browser testing of patterns against example strings.

  • Web Ramblings

  • actgardner@gmail.com

  • actgardner

  • act_gardner

Ramblings, collected.


本文来自:简书

感谢作者:大地缸

查看原文:Go Time an Online Golang Date Format Tool

相关阅读 >>

Go语言中container容器数据结构heap、list、ring

[Go]Golang 1.16 中 modules的主要变化更新

利用Golang反射机制(reflect)搭建本地leetcode调试器

Go语言 if 语句嵌套

Gocn酷Go推荐】Go程序配置利器-viper库

Golang反射用于什么场景

一文讲解Golang怎么实现反转链表

Golang gmssl编译不过

Golang双向链表

手撸Golang 结构型设计模式 桥接模式

更多相关阅读请进入《Go》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...