Skip to content

Commit

Permalink
fix: change type of dates in publiccode to string (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
tensor5 authored Feb 28, 2024
1 parent 344213c commit 3fa4ca3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/app/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ export default function Editor() {
<EditorInput fieldName="url" required />
<Input
type="date"
{...register("releaseDate", {
valueAsDate: true,
})}
{...register("releaseDate")}
label={`${t("publiccodeyml.releaseDate.label")} *`}
infoText={t("publiccodeyml.releaseDate.description")}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/app/contents/publiccode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default interface PublicCode {
landingURL?: string;
isBasedOn?: string;
softwareVersion?: string;
releaseDate: Date;
releaseDate: string; // “YYYY-MM-DD”
logo?: string;
platforms: Array<string>;
categories: Array<(typeof categories)[number]>;
Expand Down Expand Up @@ -71,7 +71,7 @@ interface Contact {

interface Contractor {
name: string;
until: Date;
until: string; // “YYYY-MM-DD”
email?: string;
website?: string;
}
Expand Down

0 comments on commit 3fa4ca3

Please sign in to comment.