Skip to content

Document differing culture-sensitivity between advanced functions and cmdlets, in about_Functions_Advanced_Parameters #3194

Closed

Description

When you supply strings as arguments to parameters that implicitly convert those strings to the parameter target type (e.g., [datetime]):

  • cmdlets perform culture-sensitive parsing,
  • whereas advanced functions perform culture-invariant parsing.

This surprising discrepancy is likely unintentional, but fixing it may be too much of a breaking change - see PowerShell/PowerShell#6989 for details.

Either way, it should be documented for the existing versions.

Note that it is the behavior of the advanced functions that is correct here, in line with PowerShell's culture-invariant casting and string interpolation.

Version(s) of document impacted

  • Impacts 6.next document
  • Impacts 6 document
  • Impacts 5.1 document
  • Impacts 5.0 document
  • Impacts 4.0 document
  • Impacts 3.0 document

Activity

  1. sdwheeler commented on Oct 30, 2018

    @sdwheeler
    Contributor

    Related to #3193

  2. added a commit that references this issue on Mar 12, 2020
    96faf9f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-engine

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions