PowerShell / PowerShell/PowerShell

Add [datetimeoffset] type accelerator

Open
#25,657 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Enhancement Needs-Triage WG-Engine WG-Engine-Format WG-NeedsReview
Dominant language
C#
Stars
55.5k
Forks
8.5k
Avg merge
1d 2h
Merged PRs (30d)
88

Description

Summary of the new feature / enhancement

The issues with [datetime] are well documented, and several people have recommended using [datetimeoffset] instead (see e.g. https://github.com/PowerShell/PowerShell/issues/18255).

Can we add an accelerator for the type to encourage this (and get tab completion for free)?

Proposed technical implementation details (optional)

Add an entry to the dictionary here: https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/parser/TypeResolver.cs#L722

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open src/System.Management.Automation/engine/parser/TypeResolver.cs and inspect the type-accelerator dictionary near the referenced location. Add the datetimeoffset entry, then verify that the type resolves through the accelerator and receives the expected tab completion.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.