DateTimeFormatInfo.LongDatePattern プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DateTimeFormatInfo.LongDatePattern プロパティの意味・解説 

DateTimeFormatInfo.LongDatePattern プロパティ

"D" 形式指定文字関連付けられた長い日付の値の形式パターン取得または設定します

名前空間: System.Globalization
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Dim instance As DateTimeFormatInfo
Dim value As String

value = instance.LongDatePattern

instance.LongDatePattern = value
public string LongDatePattern { get;
 set; }
public:
property String^ LongDatePattern {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_LongDatePattern ()

/** @property */
public void set_LongDatePattern (String value)
public function get LongDatePattern
 () : String

public function set LongDatePattern
 (value : String)

プロパティ
"D" 形式指定文字関連付けられた長い日付の値の形式パターン

例外例外
例外種類条件

ArgumentNullException

プロパティnull 参照 (Visual Basic では Nothing) に設定されています。

InvalidOperationException

プロパティ設定されていますが、DateTimeFormatInfo が読み取り専用です。

解説解説

たとえば、"dddd, dd MMMM yyyy" のように、カスタム パターン構築するために組み合わせることができるパターンについては、DateTimeFormatInfoトピック参照してください

Calendar プロパティの値が変更され場合、このプロパティ影響受けます

使用例使用例

いくつかのカルチャの LongDatePattern の値を表示するコードの例次に示します

Imports System
Imports System.Globalization

Public Class SamplesDTFI

   Public Shared Sub Main()

      ' Displays the values of the pattern properties.
      Console.WriteLine(" CULTURE    PROPERTY VALUE")
      PrintPattern("en-US")
      PrintPattern("ja-JP")
      PrintPattern("fr-FR")

   End Sub 'Main

   Public Shared Sub PrintPattern(myCulture
 As [String])

      Dim myDTFI As DateTimeFormatInfo = New
 CultureInfo(myCulture, False).DateTimeFormat
      Console.WriteLine("  {0}     {1}", myCulture,
 myDTFI.LongDatePattern)

   End Sub 'PrintPattern 

End Class 'SamplesDTFI

'This code produces the following output.  The question marks take the
 place of native script characters.
'
' CULTURE    PROPERTY VALUE
'  en-US     dddd, MMMM dd, yyyy
'  ja-JP     yyyy'?'M'?'d'?'
'  fr-FR     dddd d MMMM yyyy
'
using System;
using System.Globalization;


public class SamplesDTFI  {

   public static void Main()
  {

      // Displays the values of the pattern properties.
      Console.WriteLine( " CULTURE    PROPERTY VALUE" );
      PrintPattern( "en-US" );
      PrintPattern( "ja-JP" );
      PrintPattern( "fr-FR" );

   }

   public static void PrintPattern(
 String myCulture )  {

      DateTimeFormatInfo myDTFI = new CultureInfo( myCulture,
 false ).DateTimeFormat;
      Console.WriteLine( "  {0}     {1}", myCulture, myDTFI.LongDatePattern
 );

   }

}

/*
This code produces the following output.  The question marks take the place of native
 script characters.

 CULTURE    PROPERTY VALUE
  en-US     dddd, MMMM dd, yyyy
  ja-JP     yyyy'?'M'?'d'?'
  fr-FR     dddd d MMMM yyyy

*/
using namespace System;
using namespace System::Globalization;
void PrintPattern( String^ myCulture )
{
   CultureInfo^ MyCI = gcnew CultureInfo( myCulture,false );
   DateTimeFormatInfo^ myDTFI = MyCI->DateTimeFormat;
   Console::WriteLine( " {0} {1}", myCulture, myDTFI->LongDatePattern
 );
}

int main()
{
   
   // Displays the values of the pattern properties.
   Console::WriteLine( " CULTURE    PROPERTY VALUE" );
   PrintPattern( "en-US" );
   PrintPattern( "ja-JP" );
   PrintPattern( "fr-FR" );
}

/*
This code produces the following output.  The question marks take the place of native
 script characters.

CULTURE    PROPERTY VALUE
en-US     dddd, MMMM dd, yyyy
ja-JP     yyyy'?'M'?'d'?'
fr-FR     dddd d MMMM yyyy

*/
import System.* ;
import System.Globalization.* ;

public class SamplesDTFI
{ 
    public static void main(String[]
 args)
    {
        // Displays the values of the pattern properties.
        Console.WriteLine(" CULTURE    PROPERTY VALUE");
        PrintPattern("en-US");
        PrintPattern("ja-JP");
        PrintPattern("fr-FR");
    } //main

    public static void PrintPattern(String
 myCulture)
    {
        DateTimeFormatInfo myDTFI = 
            (new CultureInfo(myCulture, false)).get_DateTimeFormat();
        
        Console.WriteLine("  {0}     {1}", 
            myCulture, myDTFI.get_LongDatePattern());
    } //PrintPattern 
} //SamplesDTFI

/*
This code produces the following output.  
The question marks take the place of native script characters.

 CULTURE    PROPERTY VALUE
  en-US     dddd, MMMM dd, yyyy
  ja-JP     yyyy'?'M'?'d'?'
  fr-FR     dddd d MMMM yyyy
*/
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からDateTimeFormatInfo.LongDatePattern プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDateTimeFormatInfo.LongDatePattern プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDateTimeFormatInfo.LongDatePattern プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

DateTimeFormatInfo.LongDatePattern プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DateTimeFormatInfo.LongDatePattern プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS