Skip to content

Commit

Permalink
Added DateTimeUitl.toString(DateTime)
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Mar 7, 2014
1 parent d641843 commit 44933ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion common/src/main/scala/skinny/util/DateTimeUtil.scala
Expand Up @@ -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 = {
Expand Down

0 comments on commit 44933ea

Please sign in to comment.