Skip to content

fix: Date format and feedback button style #2214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 31, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ object EventUtils {
}

fun getFormattedDate(date: ZonedDateTime): String {
val dateFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("EEEE, MMM d, y")
val dateFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("EEEE, MMMM d, y")
return try {
dateFormat.format(date)
} catch (e: IllegalArgumentException) {
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/content_event.xml
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,7 @@

<Button
android:id="@+id/feedbackBtn"
style="@style/ThreeDS2TextButtonStyle"
android:textAllCaps="true"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_margin_medium"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class EventUtilsTest {
val event = getEvent()
val localizedDateTime = getEventDateTime(event.startsAt, event.timezone)
assertEquals("""
Monday, Sep 15, 2008
Monday, September 15, 2008
""".trimIndent(), EventUtils.getFormattedDate(localizedDateTime))
}

Expand Down Expand Up @@ -132,7 +132,7 @@ class EventUtilsTest {
val startsAt = getEventDateTime(event.startsAt, event.timezone)
val endsAt = getEventDateTime(event.endsAt, event.timezone)
assertEquals("""
Monday, Sep 15, 2008 at 04:23 PM - Friday, Sep 19, 2008 at 07:55 PM (IST)
Monday, September 15, 2008 at 04:23 PM - Friday, September 19, 2008 at 07:55 PM (IST)
""".trimIndent(), EventUtils.getFormattedDateTimeRangeDetailed(startsAt, endsAt))
}

Expand All @@ -142,7 +142,7 @@ class EventUtilsTest {
val startsAt = getEventDateTime(event.startsAt, event.timezone)
val endsAt = getEventDateTime(event.endsAt, event.timezone)
assertEquals("""
Monday, Sep 15, 2008 from 04:23 PM to 04:23 PM (IST)
Monday, September 15, 2008 from 04:23 PM to 04:23 PM (IST)
""".trimIndent(), EventUtils.getFormattedDateTimeRangeDetailed(startsAt, endsAt))
}

Expand Down