Permalink
Browse files

Added DateTimeUitl.toString(DateTime)

  • Loading branch information...
1 parent d641843 commit 44933ea217eefc083a131f316be38ea7ec3c40b6 @seratch seratch committed Mar 7, 2014
Showing with 6 additions and 1 deletion.
  1. +6 −1 common/src/main/scala/skinny/util/DateTimeUtil.scala
@@ -26,7 +26,12 @@ object DateTimeUtil {
/**
* Returns "2014-01-02 03:04:05".
*/
- def nowString: String = DateTime.now.toString("YYYY-MM-dd hh:mm:ss")
+ def toString(d: DateTime): String = d.toString("YYYY-MM-dd hh:mm:ss")
+
+ /**
+ * Returns "2014-01-02 03:04:05".
+ */
+ def nowString: String = toString(DateTime.now)
private case class ZeroPaddingString(s: String) {
def to04d: String = {

0 comments on commit 44933ea

Please sign in to comment.