Skip to content

Conversation

dhinojosa
Copy link

Added Rich Tuples Set making it easier to convert Tuples into DateTime objects.

e.g. (2010, 12, 13).toJodaDateMidnight
e.g. (2010, 12, 13, 19, 10, 13, 120).toJodaDateTime.getDayOfMonth
e.g. (2010, 12, 13, 19, 10, 13, 120, "US/Central").toJodaDateTime
e.g. (2010, 12, 13, 19, 10, 13, 120, DateTimeZone.forID("US/Central")).toJodaDateTime

This is purely to save time to do a tuple -> DateTime conversion and to make code cleaner and friendly.

Also offered toSqlDate and toJavaDate methods to quickly convert Tuples to javax.sql.Date and java.util.Date in case interoperability with Java is required.

Note: Turned on junit dependency to run tests.

…e objects.

e.g. (2010, 12, 13).toJodaDateMidnight
e.g. (2010, 12, 13, 19, 10, 13, 120).toJodaDateTime.getDayOfMonth
e.g. (2010, 12, 13, 19, 10, 13, 120, "US/Central").toJodaDateTime
e.g. (2010, 12, 13, 19, 10, 13, 120, DateTimeZone.forID("US/Central")).toJodaDateTime

This is purely to save time to do a tuple -> DateTime conversion and to make code cleaner and friendly.

Also offered toSqlDate and toJavaDate methods to quickly convert Tuples to javax.sql.Date and java.util.Date in case interoperability with Java is required.

Note: Turned on junit dependency to run tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant