Some plants will flower a few weeks or months after germination regardless of the weather or other environmental stimuli.

This phenomenon is called autonomous flowering and is common in species which have a short lifecycle such as annuals and ephemerals.

Annual and ephemeral species often germinate when the climate permits. For instance, some arid-climate species germinate and flower after rare desert rains. These species cannot afford to be fussy about their flowering time because they have only a short window of opportunity in which to reproduce. So in these circumstances, autonomous flowering species bloom regardless of other factors.
marigold
Marigolds are an an example of an autonomous flowering species.
In horticultural terms, this means that autonomous flowering species are almost guaranteed to flower. Species with this flowering mechanism include popular bedding annuals such as marigolds (Tagetes spp.), pansies (Viola ×wittrockiana), cinerarias (Pericallis ×hybrida) and snapdragons (Antirrhinum majus).

For some species of autonomous flowerers a particular environmental cue may still influence when the plant produces flowers, but only if it occurs within a predefined period of time. If these cues do not materialise these species will override the requirement of such a trigger and flower anyway. This is called a facultative or quantitative response.

Most plant plants are not autonomous flowerers and that is what this site is all about: Discovering the many other ways plants have managed to control when they flower.