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

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

DateTimeFormatInfo.MonthDayPattern プロパティ

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

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

Dim instance As DateTimeFormatInfo
Dim value As String

value = instance.MonthDayPattern

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

/** @property */
public void set_MonthDayPattern (String value)
public function get MonthDayPattern
 () : String

public function set MonthDayPattern
 (value : String)

プロパティ
"m""M"形式指定文字関連付けられた月と日付の値の形式パターン

例外例外
例外種類条件

ArgumentNullException

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

InvalidOperationException

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

解説解説

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

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

使用例使用例

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

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.MonthDayPattern)

   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     MMMM dd
'  ja-JP     M'?'d'?'
'  fr-FR     d MMMM
'
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.MonthDayPattern
 );

   }

}

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

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

*/
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->MonthDayPattern
 );
}

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     MMMM dd
ja-JP     M'?'d'?'
fr-FR     d MMMM

*/
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_MonthDayPattern());
    } //PrintPattern 
} //SamplesDTFI

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

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


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS