Merge branch 'feedactivities' of https://github.com/kaakaa/gitbucket into kaakaa-feedactivities

This commit is contained in:
takezoe
2014-04-18 06:44:27 +09:00
6 changed files with 46 additions and 0 deletions

View File

@@ -15,6 +15,11 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
*/
def datetime(date: Date): String = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date)
/**
* Format java.util.Date to "yyyy-MM-dd'T'hh:mm:ss'Z'".
*/
def datetimeRFC3339(date: Date): String = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss'Z'").format(date).replaceAll("(\\d\\d)(\\d\\d)$","$1:$2")
/**
* Format java.util.Date to "yyyy-MM-dd".
*/