public static String toJson ( Calendar cal ) { if ( cal == null ) { return NULL_VALUE ; } CharBuf buffer = CharBuf . create ( 26 ) ; writeDate ( cal . getTime ( ) , buffer ) ; return buffer . toString ( ) ; }
Format a calendar instance that is parseable from JavaScript according to ISO - 8601 .