This repository has been archived by the owner. It is now read-only.
Permalink
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...
jodastephen committed Jul 20, 2007
1 parent 86dc815 commit 68ab26ea17d000624214b69ce81255affc11e9ff
Showing with 10 additions and 1 deletion.
  1. +10 −1 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.

0 comments on commit 68ab26e

Please sign in to comment.