Storing dates in DB.
This commit is contained in:
parent
03355de4f4
commit
fd1de5971b
@ -2,9 +2,7 @@ accessing
|
|||||||
createdAt
|
createdAt
|
||||||
^ createdAt ifNil: [| joinDateString |
|
^ createdAt ifNil: [| joinDateString |
|
||||||
joinDateString := ((self documentTree xpath: '//div[@class="profile-joindate"]/span/@title') stringValue).
|
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 := (ZTimestampFormat fromString:'4:05 PM - 3 Feb 2001') parse: joinDateString.
|
||||||
|
createdAt := createdAt asDateAndTime
|
||||||
]
|
]
|
@ -8,5 +8,5 @@ reStoreDefinition
|
|||||||
define: #profileImageUrl as: String;
|
define: #profileImageUrl as: String;
|
||||||
define: #profileBio as: String;
|
define: #profileBio as: String;
|
||||||
define: #description as: String;
|
define: #description as: String;
|
||||||
"define: #createdAt as: String;"
|
define: #createdAt as: DateAndTime;
|
||||||
yourself.
|
yourself.
|
Loading…
Reference in New Issue
Block a user