Skip to content

Commit

Permalink
Merge pull request #56 from dev-ptera/feat/2.7.0
Browse files Browse the repository at this point in the history
2.7.0
  • Loading branch information
dev-ptera authored Apr 29, 2024
2 parents f13066b + 9124b67 commit 1d38851
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## v2.7.0 (April 28, 2024)

- Added birthday banner which displays every Apirl 1st.

## v2.6.1 (July 22, 2023)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yellow-spyglass-client",
"version": "2.6.1",
"version": "2.7.0",
"scripts": {
"ng": "ng",
"start": "ng serve -c development --open --host 0.0.0.0",
Expand Down
8 changes: 3 additions & 5 deletions src/app/navigation/navigation.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,10 @@
<div class="mat-body-2" style="display: flex; align-items: center; width: 100%">
<div style="font-size: 36px; margin-right: 16px">🙈</div>
<div style="width: 100%">
<div><strong>V28: Benissis Announcement</strong></div>
<div><strong>Happy Birthday, Banano!</strong></div>
<span style="white-space: break-spaces"
>Protocol V28 introduces KYM (Know your monKey) to adhere to global regulations, requiring
POM (Proof of monKey) for each interaction. Join the
<a href="https://chat.banano.cc/" target="_blank">#jungle</a> for our global compliance
celebration!</span
>Join the <a href="https://chat.banano.cc/" target="_blank">#jungle</a> for our yearly
birthday bananza!</span
>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions src/app/navigation/navigation.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ export class NavigationComponent {
this._listenForRouteChanges();
}

isBetweenApril1And2(): boolean {
isAprilFoolsDay(): boolean {
const today = new Date();
const april1 = new Date(today.getFullYear(), 3, 1); // April is 3 (zero-based index)
const april2 = new Date(today.getFullYear(), 3, 2);
const currentDate = today.getDate();
return currentDate >= april1.getDate() && currentDate <= april2.getDate();
const month = today.getMonth(); // getMonth() returns 0-indexed months (0 for January, 1 for February, etc.)
const day = today.getDate();

return month === 3 && day === 1; // April is the 4th month, but 0-indexed, so April is represented as 3
}

ngOnInit(): void {
this.showPrank = this.isBetweenApril1And2(); // TODO: TURN THIS OFF AFTER
this.showPrank = this.isAprilFoolsDay();
}

navigate(url: string): void {
Expand Down

0 comments on commit 1d38851

Please sign in to comment.