The amount of exposure also depends on the time of the year. In the northern hemisphere, the UVB rays are more intense during the summer months and less intense during the winter months. In fact, if you live north of the 42-degree latitude, you'll have a difficult time getting enough sun exposure from November through February. Picture a map of North America. If you live north of a line drawn on a map from the northern border of California to Boston, Massachusetts, you will probably need to get additional vitamin D from the foods you eat (or from supplements) during the winter months, even if you do go outside every day.
The intensity of UVB rays is also reduced by clouds, pollution and UVB will not travel through glass, so sitting next to a window will not give you enough sunlight to make vitamin D.calcium deficiency.
Vitamin D isn't found in many foods. You won't get any from plant-based foods unless it's added to them. Vitamin D is naturally found in oily fish like tuna and salmon, but most of the time its added. Milk, soymilk and breakfast cereals are usually fortified with vitamin D (and maybe other nutrients - check the label). You can also take vitamin D supplements, which are often found in multiple vitamins, calcium-vitamin D products, or as single nutrients. There are several forms of vitamin D and some supplements are labeled as vitamin D2 or vitamin D3. Although your body absorbs more vitamin D3, it doesn't really make much difference because you'll get enough with either type of vitamin D as long as you follow the directions on the label.
National Institutes of Health Office of Dietary Supplements. "Dietary Supplement Fact Sheet: Vitamin D." Updated May 2008.