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
const ordinalSuffixes = { | |
"one": "st", | |
"two": "nd", | |
"few": "rd", | |
"other": "th" | |
}; | |
const ordinalPluralRules = new Intl.PluralRules("en", { type: "ordinal" }); | |
function withOrdinalSuffix(x) { |
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
const fullFormat = new Intl.DateTimeFormat("en", { dateStyle: "full" }); | |
const ordinalSuffixes = { | |
"one": "st", | |
"two": "nd", | |
"few": "rd", | |
"other": "th" | |
}; | |
const ordinalPluralRules = new Intl.PluralRules("en", { type: "ordinal" }); |
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
import { OrdinalFormat } from "./ordinal-formatting.js"; | |
const fullFormat = new Intl.DateTimeFormat("en", { dateStyle: "full" }); | |
const now = new Date(); | |
const parts = fullFormat.formatToParts(now); | |
const weekDayName = parts.find(p => p.type === "weekday").value; | |
const dayName = parts.find(p => p.type === "day").value; |
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
Feature: Writing a diary entry | |
As Doogie | |
I want to be able to write a new entry in my diary | |
So that I can round off an episode with an uplifting thought | |
Background: Load the app and start editing | |
Given I have loaded the app | |
When I press the space bar | |
Scenario: I should be able to press space bar to start writing |
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
Feature: Application branding | |
As Doogie | |
I want to be bathed in the familiar blue glow of my IBM CRT monitor and text editor | |
So that I can shift into the right mental model for an uplifting closing diary entry |
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
Feature: Application branding | |
As Doogie | |
I want to be bathed in the familiar blue glow of my IBM CRT monitor and text editor | |
So that I can shift into the right mental model for an uplifting closing diary entry | |
Background: Load the app | |
Given I have loaded the app | |
Scenario: Styling | |
Then the background colour should be "bright blue" |
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
Feature: Reading diary entries | |
As Doogie | |
I want to be able to review my previous diary entries in reverse chronological order | |
So that I can scan my recent thoughts easily |
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
Feature: Reading diary entries | |
As Doogie | |
I want to be able to review my previous diary entries in reverse chronological order | |
So that I can scan my recent thoughts easily | |
Scenario: The latest entry should be shown at the top | |
Given a test entry exists dated 1 month into the future | |
""" | |
Raymond and I have a lot in common. | |
We both have to face prejudice for what we are... |
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
Feature: Writing a diary entry | |
As Doogie | |
I want to be able to write a new entry in my diary | |
So that I can round off an episode with an uplifting thought |
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
{ | |
"@context": { | |
"@vocab": "http://example.com/" | |
} | |
} |