/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.*;
import java.time.format.*;
import java.time.temporal.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
ZoneId z = ZoneId.of( "America/Montreal" );
LocalDate today = LocalDate.now( z );
MonthDay md = MonthDay.from( today );
DateTimeFormatter fUS = DateTimeFormatter.ofPattern( "MM/dd" );
DateTimeFormatter fUK = DateTimeFormatter.ofPattern( "dd/MM" );
String output
= md.
format( fUS
);
System.
out.
println( "today.toString(): " + today
); System.
out.
println( "md.toString(): " + md
); System.
out.
println( "output: " + output
);
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgppbXBvcnQgamF2YS50aW1lLio7CmltcG9ydCBqYXZhLnRpbWUuZm9ybWF0Lio7CmltcG9ydCBqYXZhLnRpbWUudGVtcG9yYWwuKjsKCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgogICAgWm9uZUlkIHogPSBab25lSWQub2YoICJBbWVyaWNhL01vbnRyZWFsIiApOwogICAgTG9jYWxEYXRlIHRvZGF5ID0gTG9jYWxEYXRlLm5vdyggeiApOwoKICAgIE1vbnRoRGF5IG1kID0gTW9udGhEYXkuZnJvbSggdG9kYXkgKTsKCiAgICBEYXRlVGltZUZvcm1hdHRlciBmVVMgPSBEYXRlVGltZUZvcm1hdHRlci5vZlBhdHRlcm4oICJNTS9kZCIgKTsKICAgIERhdGVUaW1lRm9ybWF0dG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