Skip to content

Commit

Permalink
Merge pull request #104 from ikanakova/date_format
Browse files Browse the repository at this point in the history
Correction of incorrect grammatical case in the word month
  • Loading branch information
arnowelzel authored Jun 13, 2024
2 parents 1bf0bde + 258cd38 commit 9e2f855
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
import android.widget.Toast;
import android.widget.ViewFlipper;

import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter;
import java.util.Calendar;
import java.util.GregorianCalendar;

Expand Down Expand Up @@ -523,9 +523,10 @@ private void calendarUpdate() {

// Output current year/month
TextView displayDate = findViewById(R.id.displaydate);
@SuppressLint("SimpleDateFormat") SimpleDateFormat dateFormat = new SimpleDateFormat("MMMM yyyy");
displayDate.setText(String.format("%s", dateFormat.format(cal.getTime())));
displayDate.setContentDescription(String.format("%s", dateFormat.format(cal.getTime())));
DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("LLLL yyyy");
String formatted = dateFormat.format(cal.toZonedDateTime());
displayDate.setText(String.format("%s", formatted));
displayDate.setContentDescription(String.format("%s", formatted));

// Calculate first week day of month
firstDayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
Expand Down

0 comments on commit 9e2f855

Please sign in to comment.