This file contains hidden or 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
| private setExpiresAt() { | |
| const endDate = this.event.endDate * 1000; | |
| const now = Date.now(); | |
| const expirationLimit = 72; // time in hours | |
| // Event already expired | |
| this.expiresAt = this.translate.instant('expired_event'); | |
| console.log(now - endDate); | |
| if (now - endDate <= 47 * 3600 * 1000) { | |
| // If the event ended {{expirationLimit}} or less ago | |
| const expDays = (expirationLimit / 24) - Math.ceil((now - endDate) / (24 * 3600000)); |
This file contains hidden or 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
| <?php | |
| class Tools{ | |
| /** | |
| * URL safe string encryption method | |
| * | |
| * @param string $string | |
| * @param string $key | |
| * @return string Returns an url safe encrypted string | |
| * @throws \InvalidArgumentException | |
| */ |
This file contains hidden or 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
| <?php | |
| class SleepImmersion | |
| { | |
| protected $sheeps = 0; | |
| protected $timestamp = 0; | |
| protected $userStatus = FALSE; | |
| public function __construct(){ | |
| $this->timestamp = time(); | |
| $this->isUserAsleep(); | |
| } |
NewerOlder