8000 Update width of datetime formatting to accommodate change in Japan datetime era by SteveL-MSFT · Pull Request #9503 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Update width of datetime formatting to accommodate change in Japan datetime era#9503

Merged
adityapatwardhan merged 1 commit intoPowerShell:masterfrom
SteveL-MSFT:datetime-format
May 2, 2019
Merged

Update width of datetime formatting to accommodate change in Japan datetime era#9503
adityapatwardhan merged 1 commit intoPowerShell:masterfrom
SteveL-MSFT:datetime-format

Conversation

@SteveL-MSFT
Copy link
Member
@SteveL-MSFT SteveL-MSFT commented Apr 30, 2019

PR Summary

With the new Emperor, Japan is entering a new era which affects the format of their datetime. It needs one more character to the width. Since I don't anticipate this change happening again (the last time I believe was hundreds of years ago), I'm simply updating the width from 25 to 26 rather than defining a const.

PR Checklist

@PoshChan
Copy link
Collaborator

@SteveL-MSFT, your last commit had 1 failures in PowerShell-CI-static-analysis
Verify Markdown Links.Verify links in /home/vsts/work/1/s/docs/building/windows-core.md.https://www.microsoft.com/net/core#windowscmd should work

retry of URL failed with error: 
at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-link.tests.ps1: line 113
113:                                 throw "retry of URL failed with error: $($_.Message)"

@SteveL-MSFT
Copy link
Member Author

@PoshChan please retry static

@PoshChan
Copy link
Collaborator

@SteveL-MSFT, successfully started retry of PowerShell-CI-static-analysis

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label May 1, 2019
@iSazonov iSazonov added this to the 7.0.0-preview.1 milestone May 1, 2019
@adityapatwardhan adityapatwardhan merged commit eedb37f into PowerShell:master May 2, 2019
@SteveL-MSFT SteveL-MSFT deleted the datetime-format branch May 2, 2019 16:43
@stknohg
Copy link
Contributor
stknohg commented May 8, 2019

This pull request probably corrects the display of "元年"(the first year), but I think it seems to have no effect.
I tried to display "元年" with the latest master build(2be3db8).

Language Setting

fig01

  • Using Japanese Era

Result of dir command

fig02

C:\> $PSVersionTable.GitCommitId
6.2.0-rc.1-219-g2be3db8ab8757fe9ecccd2cc545ae9044ed76574
C:\> dir


    Directory: C:\

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          平成31年4月26日    14:58                Go
d----          平成31年4月18日    17:36                Intel
d----          平成30年9月15日    16:33                PerfLogs
d-r--            令和元年5月7日    18:28                Program Files
d-r--            令和元年5月7日    15:34                Program Files (x86)
d----            令和元年5月8日     9:38                Program Files2
d----          平成31年4月26日    16:08                project
d----            令和元年5月7日    15:56                temp
d-r--          平成31年4月26日    13:36                Users
d----            令和元年5月7日    10:42                Windows
d----            令和元年5月7日     9:19                Windows.old
  • LastWriteTime width is 26.
  • 元年 is 2 Full width charactors. "令和元年5月7日"(=2019.05.07) has 8 charactors, so the date of LastWriteTime starts with 2 whitespaces.

@stknohg
Copy link
Contributor
stknohg commented May 8, 2019

To solve this problem fundamentally, it is necessary to handle the east asian full width character's width correctly.
(related issue ; #6290)

This full width charactor problem is very difficult, I think it is better to revert this commit and simply ignore the display collapse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0