Skip to content

Instantly share code, notes, and snippets.

@lengocgiang
Created August 28, 2018 11:14
Show Gist options
  • Save lengocgiang/ae23fe11dc67903c60afd3043ce7399d to your computer and use it in GitHub Desktop.
Save lengocgiang/ae23fe11dc67903c60afd3043ce7399d to your computer and use it in GitHub Desktop.
format with string
package ivimage
import (
"fmt"
"testing"
"time"
)
func TestImage_Save(t *testing.T) {
// Please dont change value, you should change format
//mdY
format1 := time.Now().UTC().Format("01022006")
// Y-m-d hh:mm:ss
format2 := time.Now().UTC().Format("2006-01-02 15:04:05")
// d-m-Y hh:mm:ss.fff
format3 := time.Now().UTC().Format("02-01-2006 15:04:05.006")
fmt.Println(format1)
fmt.Println(format2)
fmt.Println(format3)
fmt.Println(format1) // 08282018
fmt.Println(format2) // 2018-08-28 11:11:33
fmt.Println(format3) // 28-08-2018 11:13:44.018
}
@myselfuser1
Copy link

Why did you delete the Crop, rotate , remove audio from video for ios videos in swift gist? Please bring it back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment