Wednesday 7 January 2009

Get-JulianEraField.ps1

  1. <# 
  2. .Synopsis 
  3.     Displays the value of the [System.Globalzation.JulianCalendar}::JulianEra field 
  4. .Description 
  5.    This script retreives the JulianEra field and displays it, using the .NET class 
  6.    System.Globalization.JulianCalendar. 
  7. .NOTES 
  8.     File Name  : Get-JulianEraField.ps1 
  9.     Author     : Thomas Lee - tfl@psp.co.uk 
  10.     Requires   : PowerShell V2 CTP3 
  11. .LINK 
  12.     Script Posted to: 
  13.     http://www.pshscripts.blogspot.com 
  14.     MSDN Sample at: 
  15.     http://msdn.microsoft.com/en-us/library/system.globalization.juliancalendar.julianera.aspx 
  16. .Example 
  17.     PS C:\foo> .\Get-JulianEraField.ps1 
  18.     The JulianEra Field has a value of: 1 
  19. #> 
  20.  
  21. ### 
  22. # Start of Script 
  23. ## 
  24.  
  25. # Get the value 
  26. $era = [system.Globalization.JulianCalendar]::JulianEra 
  27.  
  28. # Format it 
  29. "The JulianEra field has a value of: {0}" -f $era 

No comments: