Skip to content

Commit b7d8ac8

Browse files
committed
fix: Date format and feedback button style (#2213)
1 parent 5d273d0 commit b7d8ac8

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

app/src/main/java/org/fossasia/openevent/general/event/EventUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ object EventUtils {
5151
}
5252

5353
fun getFormattedDate(date: ZonedDateTime): String {
54-
val dateFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("EEEE, MMM d, y")
54+
val dateFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("EEEE, MMMM d, y")
5555
return try {
5656
dateFormat.format(date)
5757
} catch (e: IllegalArgumentException) {

app/src/main/res/layout/content_event.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,7 @@
557557

558558
<Button
559559
android:id="@+id/feedbackBtn"
560-
style="@style/ThreeDS2TextButtonStyle"
561-
android:textAllCaps="true"
560+
style="@style/Widget.MaterialComponents.Button.TextButton"
562561
android:layout_width="match_parent"
563562
android:layout_height="wrap_content"
564563
android:layout_marginTop="@dimen/layout_margin_medium"

app/src/test/java/org/fossasia/openevent/general/event/EventUtilsTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class EventUtilsTest {
8282
val event = getEvent()
8383
val localizedDateTime = getEventDateTime(event.startsAt, event.timezone)
8484
assertEquals("""
85-
Monday, Sep 15, 2008
85+
Monday, September 15, 2008
8686
""".trimIndent(), EventUtils.getFormattedDate(localizedDateTime))
8787
}
8888

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

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

0 commit comments

Comments
 (0)