Skip to content

Commit

Permalink
new date format
Browse files Browse the repository at this point in the history
  • Loading branch information
Levin committed Oct 19, 2024
1 parent 63b0e53 commit 991bfe9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# fly.toml app configuration file generated for algground on 2024-10-19T10:38:07Z
# fly.toml app configuration file generated for aww on 2024-10-19T15:46:50Z
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'algground'
app = 'aww'
primary_region = 'mad'
kill_signal = 'SIGTERM'

Expand All @@ -13,7 +13,7 @@ kill_signal = 'SIGTERM'
release_command = '/app/bin/migrate'

[env]
PHX_HOST = 'algground.fly.dev'
PHX_HOST = 'aww.fly.dev'
PORT = '8080'

[http_service]
Expand Down
6 changes: 3 additions & 3 deletions lib/algground_web/live/pages/live_home_page.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defmodule AlggroundWeb.LiveHomePage do

{:ok,
socket
|> assign(:date, Date.utc_today())
|> assign(:date, Datex.Date.today())
|> assign(:regions, regions)
|> assign(:groundwater, trunc(:rand.uniform() * 100))
|> assign(:rainfall, trunc(:rand.uniform() * 100))
Expand All @@ -58,7 +58,7 @@ defmodule AlggroundWeb.LiveHomePage do
{:noreply,
socket
|> assign(:regions, regions)
|> assign(:date, Date.add(socket.assigns.date, 31))
|> assign(:date, Datex.Date.add(socket.assigns.date, 31))
|> assign(:groundwater, trunc(:rand.uniform() * 100))
|> assign(:rainfall, trunc(:rand.uniform() * 100))
|> assign(:reservoirs, trunc(:rand.uniform() * 10_000_000))}
Expand All @@ -70,7 +70,7 @@ defmodule AlggroundWeb.LiveHomePage do
<div class="bg-gray-50 py-6 sm:py-6 rounded-lg">
<div class="mx-auto max-w-2xl px-6 lg:max-w-7xl lg:px-8">
<p class="mx-auto max-w-lg text-pretty text-center font-medium tracking-tight text-gray-400 text-3xl">
<%= @date %>
<%= Datex.Date.format_date(@date, "DD/MM/YYYY") %>
</p>
<p class="mx-auto max-w-lg text-pretty text-center font-medium tracking-tight text-gray-950 text-3xl">
Albufeira
Expand Down
3 changes: 2 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ defmodule Algground.MixProject do
{:gettext, "~> 0.20"},
{:jason, "~> 1.2"},
{:dns_cluster, "~> 0.1.1"},
{:bandit, "~> 1.5"}
{:bandit, "~> 1.5"},
{:datex, "~> 1.0"}
]
end

Expand Down
2 changes: 2 additions & 0 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
%{
"bandit": {:hex, :bandit, "1.5.7", "6856b1e1df4f2b0cb3df1377eab7891bec2da6a7fd69dc78594ad3e152363a50", [:mix], [{:hpax, "~> 1.0.0", [hex: :hpax, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:thousand_island, "~> 1.0", [hex: :thousand_island, repo: "hexpm", optional: false]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "f2dd92ae87d2cbea2fa9aa1652db157b6cba6c405cb44d4f6dd87abba41371cd"},
"castore": {:hex, :castore, "1.0.9", "5cc77474afadf02c7c017823f460a17daa7908e991b0cc917febc90e466a375c", [:mix], [], "hexpm", "5ea956504f1ba6f2b4eb707061d8e17870de2bee95fb59d512872c2ef06925e7"},
"datex": {:hex, :datex, "1.0.0", "29478d01fd394c6d785bba8d6e79cdd74fee3ae518ccb3ac5fc759a53ea715e2", [:mix], [], "hexpm", "863d1686796e30563613051783723f3ece74f2d84e2d3df2c70b834271586f11"},
"datix": {:hex, :datix, "0.3.2", "fac7ef37c3de1f535f8f2cce511e2948e72005781661c77e26fb421191724e7f", [:mix], [], "hexpm", "0ed482f82e07c8094a2ee89a00c25ceb18909213730c2d4cb3c21b07f72d0539"},
"db_connection": {:hex, :db_connection, "2.7.0", "b99faa9291bb09892c7da373bb82cba59aefa9b36300f6145c5f201c7adf48ec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dcf08f31b2701f857dfc787fbad78223d61a32204f217f15e881dd93e4bdd3ff"},
"decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"},
"dns_cluster": {:hex, :dns_cluster, "0.1.3", "0bc20a2c88ed6cc494f2964075c359f8c2d00e1bf25518a6a6c7fd277c9b0c66", [:mix], [], "hexpm", "46cb7c4a1b3e52c7ad4cbe33ca5079fbde4840dedeafca2baf77996c2da1bc33"},
Expand Down

0 comments on commit 991bfe9

Please sign in to comment.