Skip to content

Commit

Permalink
Merge branch 'main' of github.com:formkit/tempo
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-schroeder committed Feb 13, 2024
2 parents 949d9f0 + ca1ac5b commit 02f4b87
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/components/SuperHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
`"
>
<NuxtLink
to="https://formkit.com"
to="https://formkit.com?utm_source=tempo&utm_medium=website&utm_campaign=header"
:class="`
group/logo
head-message
Expand Down
2 changes: 1 addition & 1 deletion docs/components/TheFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class="text-3xl mb-4"
/>
<NuxtLink
to="https://formkit.com"
to="https://formkit.com?utm_source=tempo&utm_medium=website&utm_campaign=footer"
class="head-message text-sm flex text-slate-500 hover:text-slate-800 transition-all dark:text-purple-200/75 dark:hover:text-slate-200"
>
<LogoMark class="w-3 mr-2 fill-[#FCAB5E]" /> Made with ♥ by
Expand Down
14 changes: 7 additions & 7 deletions docs/components/content/Data.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const fns: Record<
example: "ap",
},
dayOfYear: {
description: `Gets the what day of the year a given date is. For example, August 1st is the 213th day of the year on non-leapyears and 214th on leapyears.`,
description: `Gets the day of the year a given date is. For example, August 1st is the 213th day of the year on non-leap years and 214th on leap years.`,
arguments: [
{
name: "date",
Expand All @@ -53,7 +53,7 @@ const fns: Record<
},
fourDigitYear: {
description:
"Converts a 2 digit year into a 4 digit year. This function assumes years 20 years into the future belong to the current century, and the past 80 are in the past.",
"Converts a 2 digit year into a 4 digit year. This function assumes years 20 years into the future belong to the current century, and the past 80 are in the past century.",
arguments: [
{
name: "year",
Expand Down Expand Up @@ -104,7 +104,7 @@ const fns: Record<
},
offset: {
description:
"Returns the offset between two (IANA) timezones on a given date. The results are ISO8601 compatible string offsets like -0800 or +0530.",
"Returns the offset between two (IANA) timezones on a given date. The results are ISO 8601 compatible string offsets like -0800 or +0530.",
arguments: [
{
name: "date",
Expand All @@ -113,12 +113,12 @@ const fns: Record<
{
name: "tzA?",
type: "string",
comment: "// default: UTC, ex: America/New_York",
comment: "default: UTC, ex: America/New_York",
},
{
name: "tzB?",
type: "string",
comment: "// default: browser, ex: Europe/Paris",
comment: "default: browser, ex: Europe/Paris",
},
],
return: "string",
Expand All @@ -134,12 +134,12 @@ const fns: Record<
{
name: "locale",
type: "string",
comment: '// default: "en"',
comment: 'default: "en"',
},
{
name: "genitive?",
type: "boolean",
comment: "// default: false",
comment: "default: false",
},
],
return: "string[]",
Expand Down
9 changes: 5 additions & 4 deletions docs/components/content/Format.vue
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,11 @@ import { format } from "@formkit/tempo"
<CodeExample file="format-tz" />
<h3 id="format-part-filter">Part filter</h3>
<p>
The <code>partFilter</code> option allows you to filter out parts of the
formatted date. The function is called with each "part" of the formatted
date and should return a boolean indicating whether or not to include that
part in final formatted string.
The <code>partFilter</code> option allows you to filter out
<a href="https://tc39.es/ecma402/#table-datetimeformat-resolvedoptions-properties">parts</a>
of the formatted date. The function is called with each "part" of the
formatted date and should return a boolean indicating whether or not to
include that part in final formatted string.
</p>
<CodeExample file="format-part-filter" />
<h3 id="format-genitive">Genitive case</h3>
Expand Down
9 changes: 5 additions & 4 deletions docs/components/content/Parse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ const parseOptionsProperties = [
</p>
<h3 id="parse-part-filter">partFilter</h3>
<p>
The <code>partFilter</code> option gives you fine grained control over
which pieces and parts of a date you’d like to include in the resulting
<code>Date</code> object (remember, missing "parts" will default to the
today’s date at midnight local).
The <code>partFilter</code> option gives you fine-grained control over
which pieces and <a href="https://tc39.es/ecma402/#table-datetimeformat-resolvedoptions-properties">parts</a>
of a date you’d like to include in the resulting <code>Date</code> object
(remember, missing "parts" will default to the today’s date at midnight
local).
</p>
<CodeExample file="part-filter" />
<h3 id="dateOverflow">dateOverflow</h3>
Expand Down
1 change: 1 addition & 0 deletions docs/examples/addDay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { addDay } from "@formkit/tempo"

// Add 1 day
addDay("2013-03-15")

// Add 5 days
addDay("2013-03-15", 5)

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/parse-basic.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { parse, format } from "@formkit/tempo"

// ISO8601 is the default a format
// ISO 8601 is the default format
parse("1987-12-17")

// Sample date formats
Expand Down
2 changes: 1 addition & 1 deletion docs/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default defineNuxtConfig({
},
{
name: "twitter:image",
content: "https://tempo.formkit.dev/og.png",
content: "https://tempo.formkit.com/og.png",
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion src/dayOfYear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { DateInput } from "./types"

/**
* Gets the what day of the year a given date is. For example, August 1st is
* the 213th day of the year on non-leapyears and 214th on leapyears.
* the 213th day of the year on non- years and 214th on leap years.
* @param inputDate - The input date.
*/
export function dayOfYear(inputDate: DateInput): number {
Expand Down

0 comments on commit 02f4b87

Please sign in to comment.