Skip to content

Converts LDAP Generalized Time strings to Date objects

License

Notifications You must be signed in to change notification settings

squashriddle/ldap2date.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

ldap2date.js

Do you have a string in RFC 4517 Generalized Time syntax, when you really just want a Date?

Or perhaps you need some Generalized Time, but have a Date instead.

If so, the methods below may help you.

Usage

ldap2date.parse(time)

Returns a new Date() object

  • time - A LDAP Generalized-Time string

null will be returned if the time string cannot be parsed into a valid Date object.


ldap2date.toGeneralizedTime(date)

Returns a string in GeneralizedTime syntax

  • date - A date object

About

Converts LDAP Generalized Time strings to Date objects

Resources

License

Stars

Watchers

Forks

Packages

No packages published