Skip to content

Add Celsius unit support#4

Open
shanev wants to merge 1 commit into
mainfrom
1-add-celsius-support
Open

Add Celsius unit support#4
shanev wants to merge 1 commit into
mainfrom
1-add-celsius-support

Conversation

@shanev

@shanev shanev commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #1

Introduces Celsius unit support to the weather CLI by adding flags for metric temperature display. This allows users to toggle between Fahrenheit and Celsius output via command-line arguments.

Key Changes

  • Added --celsius and -c flags to index.js for temperature unit conversion.
  • Implemented Celsius calculation logic using (F - 32) * 5/9.
  • Updated README.md with usage examples and options documentation.

Testing

  • Ran npm start "San Francisco" --celsius and verified output is 22°C.
  • Ran npm start "London" and verified output defaults to 72°F.
  • TODO: Validate output with actual dynamic API data once integrated.

Add --celsius and -c flags to display temperatures in Celsius units.
Updated README documentation to include usage examples for the new
options.
@shanev shanev self-assigned this Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Celsius support

1 participant