Skip to content

Gilt Foundation Classes Collection Version 1 UUID Module

License

Notifications You must be signed in to change notification settings

anzecesar/gfc-timeuuid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Gfc TimeUuid

An timeuuid library in Scala base on http://www.ietf.org/rfc/rfc4122.txt which generates version 1 UUIDs.

Example Usage

Generates a new unique time based UUID

val uuid = TimeUuid()

Convert time UUID to unix timestamp

import com.gilt.timeuuid._

val uuid = TimeUuid()
val timestamp = uuid.toLong

Convert time UUID to unix date

import com.gilt.timeuuid._

val uuid = TimeUuid()
val date = uuid.toDate

Convert arrays of 16 bytes to UUID: val bytes = new ArrayByte val uuid = bytes.toUUID

License

Copyright 2014 Gilt Groupe, Inc.

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

About

Gilt Foundation Classes Collection Version 1 UUID Module

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%