Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to convert time:Civil to string by using the time abbreviation #487

Merged
merged 14 commits into from
Sep 12, 2024

Conversation

ayeshLK
Copy link
Member

@ayeshLK ayeshLK commented Sep 12, 2024

Purpose

$subject

Fixes: #6986
Related to: #778

Examples

time:Utc utc = time:utcNow();
time:TimeZone zone = check new ("America/New_York");
time:Civil civilTime = zone.utcToCivil(utc);
string civilDate = check time:civilToString(civilTime);
io:println(civilDate);

Result:

2024-09-12T07:29:45.674107370-04:00[America/New_York]

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests
  • Updated the spec
  • Checked native-image compatibility

@ayeshLK ayeshLK marked this pull request as draft September 12, 2024 04:53
@ayeshLK ayeshLK removed the request for review from shafreenAnfar September 12, 2024 04:53
ballerina/time_apis.bal Outdated Show resolved Hide resolved
@ayeshLK ayeshLK marked this pull request as ready for review September 12, 2024 11:31
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.60%. Comparing base (75db636) to head (8d36a27).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #487      +/-   ##
============================================
+ Coverage     92.53%   92.60%   +0.07%     
  Complexity       62       62              
============================================
  Files            13       13              
  Lines           415      419       +4     
  Branches         90       94       +4     
============================================
+ Hits            384      388       +4     
  Misses           23       23              
  Partials          8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

daneshk
daneshk previously approved these changes Sep 12, 2024
Copy link

sonarcloud bot commented Sep 12, 2024

@ayeshLK ayeshLK merged commit 6335bd3 into ballerina-platform:master Sep 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants