Storing dates in DB.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-07-27 18:00:25 -05:00
parent 03355de4f4
commit fd1de5971b
2 changed files with 3 additions and 5 deletions

View File

@ -2,9 +2,7 @@ accessing
createdAt
^ createdAt ifNil: [| joinDateString |
joinDateString := ((self documentTree xpath: '//div[@class="profile-joindate"]/span/@title') stringValue).
"joinDateString := joinDateString copyReplaceAll: '3 May' with: '03 May'.
joinDateString := joinDateString copyReplaceAll: '5 May' with: '05 May'.
joinDateString := joinDateString copyReplaceAll: '2 Feb' with: '02 Feb'.
joinDateString := joinDateString copyReplaceAll: '6 Mar' with: '06 Mar'."
createdAt := (ZTimestampFormat fromString:'4:05 PM - 3 Feb 2001') parse: joinDateString.
createdAt := createdAt asDateAndTime
]

View File

@ -8,5 +8,5 @@ reStoreDefinition
define: #profileImageUrl as: String;
define: #profileBio as: String;
define: #description as: String;
"define: #createdAt as: String;"
define: #createdAt as: DateAndTime;
yourself.