Cleanup in tempView's decimals & smaller fix #869

Open
opened 2026-05-11 08:27:46 +00:00 by c24danli · 0 comments
Collaborator

In the diffrent temprature mockup views we currently have 2 decimals (or more) to display temprature.
The customer have said that we should change this to 1 decimal as its a more common way to show temp.
image
As this is a small issue i will add some cleanup in SMHIForcastView
Currently we have one of the displayed times as us time

							<span className={styles.prognosisElement}>
								{new Date(date).toLocaleDateString('en-US', {
									weekday: 'long',
								})}

and the other as sv

	const createdTime = new Date(Date.parse(data.createdTime)).toLocaleString(
		'sv-SE',
	);
	//Makes a new array and groups all times related to a specific day with eachother.
	const groupedByDate = data.timeSeries.reduce((acc, item) => {
		const date = new Date(item.time);
		const dayKey = date.toLocaleDateString('sv-SE');

change both to sv-SE

In the diffrent temprature mockup views we currently have 2 decimals (or more) to display temprature. The customer have said that we should change this to 1 decimal as its a more common way to show temp. ![image](/attachments/364d347f-2624-4c22-9b8f-3d1981406669) As this is a small issue i will add some cleanup in SMHIForcastView Currently we have one of the displayed times as us time ``` <span className={styles.prognosisElement}> {new Date(date).toLocaleDateString('en-US', { weekday: 'long', })} ``` and the other as sv ``` const createdTime = new Date(Date.parse(data.createdTime)).toLocaleString( 'sv-SE', ); //Makes a new array and groups all times related to a specific day with eachother. const groupedByDate = data.timeSeries.reduce((acc, item) => { const date = new Date(item.time); const dayKey = date.toLocaleDateString('sv-SE'); ``` change both to sv-SE
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K#869
No description provided.