Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add now() to provide static import access to the current date and time

git-svn-id: https://threeten.svn.sourceforge.net/svnroot/threeten/trunk/jsr-310-ri@70 291d795c-afe8-5c46-8ee5-bf9dd72e1864
  • Loading branch information...
commit 68ab26ea17d000624214b69ce81255affc11e9ff 1 parent 86dc815
@jodastephen jodastephen authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/main/java/javax/time/Moments.java
View
11 src/main/java/javax/time/Moments.java
@@ -35,11 +35,20 @@
/**
* A set of utility methods for working with moments in the Java Date Framework.
- *
+ *
* @author Stephen Colebourne
*/
public final class Moments {
+ /**
+ * Provides access to the current time.
+ *
+ * @return the current time, never null
+ */
+ public static Now now() {
+ return Now.system();
+ }
+
//-----------------------------------------------------------------------
/**
* Gets an instance of Year.
Please sign in to comment.
Something went wrong with that request. Please try again.