All Projects → cactus → gostrftime

cactus / gostrftime

Licence: ISC license
strftime for Go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to gostrftime

Python Wechat Itchat
微信机器人,基于Python itchat接口功能实例展示:01-itchat获取微信好友或者微信群分享文章、02-itchat获取微信公众号文章、03-itchat监听微信公众号发送的文章、04 itchat监听微信群或好友撤回的消息、05 itchat获得微信好友信息以及表图对比、06 python打印出微信被删除好友、07 itchat自动回复好友、08 itchat微信好友个性签名词云图、09 itchat微信好友性别比例、10 微信群或微信好友撤回消息拦截、11 itchat微信群或好友之间转发消息
Stars: ✭ 216 (+928.57%)
Mutual labels:  time
SonataTimelineBundle
[Abandoned] Integrates SpyTimelineBundle into Sonata
Stars: ✭ 24 (+14.29%)
Mutual labels:  time
crystime
Advanced time, calendar, schedule, and remind library for Crystal
Stars: ✭ 23 (+9.52%)
Mutual labels:  time
Jiffy
Jiffy is a Flutter (Android, IOS and Web) date time package inspired by momentjs for parsing, manipulating, querying and formatting dates
Stars: ✭ 238 (+1033.33%)
Mutual labels:  time
nativescript-datetimepicker
Plugin with date and time picking fields
Stars: ✭ 26 (+23.81%)
Mutual labels:  time
iso8601
A fast ISO8601 date parser for Go
Stars: ✭ 122 (+480.95%)
Mutual labels:  time
Sonataintlbundle
Symfony SonataIntlBundle
Stars: ✭ 212 (+909.52%)
Mutual labels:  time
ngx-mat-timepicker
A true material timepicker
Stars: ✭ 45 (+114.29%)
Mutual labels:  time
ptera
Ptera is DateTime library for Deno
Stars: ✭ 62 (+195.24%)
Mutual labels:  time
ardusamber
Desamber time Arduino corporealization
Stars: ✭ 20 (-4.76%)
Mutual labels:  time
Server
self-hosted tag-based time tracking
Stars: ✭ 238 (+1033.33%)
Mutual labels:  time
Prayer Times Android Azan
Prayer + Time + Android + Kotlin + Azan + Library + timezone + islamic + salah + Library aiming to calculate prayer time with one line code , if you implement prayer time application , there is no need to do this headache again .
Stars: ✭ 251 (+1095.24%)
Mutual labels:  time
jodaTime
Format and Parse date and time with joda layout
Stars: ✭ 67 (+219.05%)
Mutual labels:  time
Blitz
Android Library: Set self-updating string with relative time in TextView (e.g. 5 minutes ago)
Stars: ✭ 217 (+933.33%)
Mutual labels:  time
easyappointments-integrations
📅 Various platform integration packages of Easy!Appointments
Stars: ✭ 29 (+38.1%)
Mutual labels:  time
Twas
🕰 Tiny (280B) relative time string function (eg: "3 seconds ago")
Stars: ✭ 212 (+909.52%)
Mutual labels:  time
QuickTraceiOSLogger
A real time iOS log trace tool, view iOS log with pc web browser under local area network, which will automatically scroll like xcode. 一个实时的iOS日志跟踪工具,在局域网中使用 PC Web 浏览器查看 iOS 日志,它将像xcode一样自动滚动。
Stars: ✭ 16 (-23.81%)
Mutual labels:  time
timechange
Efficient Updating of Date-Times
Stars: ✭ 25 (+19.05%)
Mutual labels:  time
lit-date
Light-weight, faster datetime formatter for modern browsers.
Stars: ✭ 33 (+57.14%)
Mutual labels:  time
perfy
A simple, light-weight NodeJS utility for measuring code execution in high-resolution real times.
Stars: ✭ 54 (+157.14%)
Mutual labels:  time

gostrftime

Build Status GoDoc Go Report Card License

About

A Go pkg for formatting time.Time in an strftime(3) like way. Basically, strftime for Go, with a couple of additions.

Installing

$ go get github.com/cactus/gostrftime

Supported formats:

code example Description
%A Sunday full weekday name
%a Sun abbreviated weekday name
%B September full month name
%b Sep abbreviated month name
%C 20 (year / 100) as number. Single digits are preceded by zero
%D 09/21/14 equivalent to %m/%d/%y
%d 21 day of month as number. Single digits are preceded by zero
%e 21 day of month as number. Single digits are preceded by a blank
%f 001234 microsecond as a six digit decimal number, zero-padded on the left
%F 2014-09-21 equivalent to %Y-%m-%d
%H 15 the hour (24 hour clock) as a number. Single digits are preceded by zero
%h Sep same as %b
%I 03 the hour (12 hour clock) as a number. Single digits are preceded by zero
%j 264 the day of the year as a decimal number. Single digits are preced by zeros
%k 15 the hour (24 hour clock) as a number. Single digits are preceded by a blank
%L 001 millisecond as a three digit decimal number, zero-padded on the left
%l 11 replaced by the hour (12 hour clock) as a number. Single digits are preceded by blank
%M 32 replaced by the minute as a decimal number. Single digits are preceded by a zero
%m 09 replaced by the month as a decimal number. Single digits are preceded by a zero
%N 001234567 nanosecond as a 9 digit decimal number, zero-padded on the left
%n \n a newline
%P am am or pm as appropriate
%p AM AM or PM as appropriate
%R 15:32 equivalent to %H:%M
%r 03:32:05 AM equivalent to %I:%M:%S %p
%S 05 the second as a number. Single digits are preceded by a zero
%s 1461497457 the number of seconds since the Epoch, UTC
%T 15:32:05 equivalant to %H:%M:%S
%t \t a tab
%v 21-Sep-2014 equivalent to %e-%b-%Y
%w 0 the weekday (Sunday as first day of the week) as a number
%Y 2014 replaced by the year with century as a number
%y 14 year without century as a number. Single digits are preceded by zero
%Z UTC time zone name
%z -0700 the time zone offset from UTC

Using

import (
    "fmt"
    "time"
    "github.com/cactus/gostrftime"
)

func main() {
    now := time.Now()
    fmt.Println(gostrftime.Format("%Y-%m-%d", now))
}

License

Released under an ISC license. See LICENSE.md file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].