Skip to content

Commit

Permalink
Merge pull request #36 from krymtkts:feature/fix-typo
Browse files Browse the repository at this point in the history
Fix typos.
  • Loading branch information
krymtkts committed Jul 25, 2023
2 parents 85822ca + 50257b8 commit 86bda10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Common.fs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ module DateTime =
let formatter: obj = Intl.DateTimeFormat "en-US" options
let zonePattern = new Regex(@"GMT([+-])(\d+)")

let toRFC322DateTime (d: DateTime) =
let toRFC822DateTime (d: DateTime) =
let parts: obj [] = formatter?formatToParts (d)
let p: string [] = parts |> Array.map (fun x -> x?value)
let d = $"{p.[0]}{p.[1]}{p.[4]} {p.[2]} {p.[6]}"
Expand All @@ -352,5 +352,5 @@ module DateTime =
module String =
open System

let toRFC322DateTime (s: string) =
DateTime.Parse(s) |> DateTime.toRFC322DateTime
let toRFC822DateTime (s: string) =
DateTime.Parse(s) |> DateTime.toRFC822DateTime
4 changes: 2 additions & 2 deletions src/Generator.fs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ let generateFeed (conf: FeedConf) =
| Some d -> d
| None -> meta.date
| None -> meta.date
|> String.toRFC322DateTime
|> String.toRFC822DateTime

{ guid = link
link = link
Expand All @@ -296,7 +296,7 @@ let generateFeed (conf: FeedConf) =
description = conf.description
link = conf.link
xml = conf.feed
lastBuildDate = now |> DateTime.toRFC322DateTime
lastBuildDate = now |> DateTime.toRFC822DateTime
generator = conf.generator }
items

Expand Down

0 comments on commit 86bda10

Please sign in to comment.