Skip to content

Streamline the java StringToTime code#2

Open
jtnelson wants to merge 5 commits intocollegeman:masterfrom
jtnelson:master
Open

Streamline the java StringToTime code#2
jtnelson wants to merge 5 commits intocollegeman:masterfrom
jtnelson:master

Conversation

@jtnelson
Copy link

Streamlined the code to function more as a static utility class and be compatible with Joda DateTime.

Change-Id: Ia5a04830b15ca0d57e746cd20723ee9a214ccbe6
Change-Id: I96d2dff9864e0de538711176b12c61ffa8061b1a
…tatic factories that return joda or long timestamp

Change-Id: I88908e2ef377dd16ce3a28677b7ded353856b2ff
There is really no need for StringToTime to be used as an object
instance, especially since java Date is inferior to Joda DateTime.
Therefore, I've altered the class to preserve the parsing logic that
the original author wrote, but to function as a static util class and
either return a timestamp or a joda DateTime object. This greatly
simplifies the class.

Right now, the parsing still uses java Date under the hood, but that
may be changed in a future commit

Change-Id: Ice0dc3287117b0017dfea7c6b18b4850f048cdf1
Change-Id: Ie8def9f5b20b32df33c5447308784d2232c8a180
@collegeman
Copy link
Owner

Thanks for your effort! I haven't used this code in years. I haven't
written Java in years!


Aaron Collegeman
aaroncollegeman@gmail.com

On Sun, Nov 10, 2013 at 12:04 PM, Jeff Nelson notifications@github.comwrote:

Streamlined the code to function more as a static utility class and be

compatible with Joda DateTime.

You can merge this Pull Request by running

git pull https://github.com/jtnelson/stringtotime master

Or view, comment on, or merge it at:

#2
Commit Summary

  • Added gradle support
  • Added eclipse project files
  • deprecated old static factories and public constructors in favor of
    static factories that return joda or long timestamp
  • Turn StringToTime into a static utility class
  • remove unused exception class and cleanup tests

File Changes

Patch Links:

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.

2 participants