-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
936f90d
commit e0d0db4
Showing
5 changed files
with
124 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package base | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/GenerateNU/sac/backend/entities/models" | ||
) | ||
|
||
type EventPreview struct { | ||
Title string `json:"title"` | ||
|
||
EventType models.EventType `json:"event_type"` | ||
Location string `json:"location"` | ||
Link string `json:"link"` | ||
|
||
StartTime time.Time `json:"start_time"` | ||
EndTime time.Time `json:"end_time"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package utilities | ||
|
||
import "time" | ||
|
||
type TimeFormat string | ||
|
||
const ( | ||
YYYY_dash_MM_dash_DD TimeFormat = "2006-01-02" | ||
) | ||
|
||
func ParseTime(s string, format TimeFormat) (time.Time, error) { | ||
return time.Parse(string(format), s) | ||
} |