encode method
Package private implementation shared with HDateTime
Implementation
void encode(StringBuffer s) {
s.write(year);
s.write('-');
if (month < 10) {
s.write('0');
}
s.write(month);
s.write('-');
if (day < 10) {
s.write('0');
}
s.write(day);
}